搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

JavaScript Function

  • 7 回覆
  • 1 有這個問題
  • 33 次檢視
  • 最近回覆由 deedledee

more options

Is there a setting that will make this button in the toolbar (Add to Cozi Meals) add the recipe instead of returning a "Page Not Found" error? javascript:(function(){window.open('/web/20150910032430/https://my.cozi.com/meals/?action=add&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title));})()

Is there a setting that will make this button in the toolbar (Add to Cozi Meals) add the recipe instead of returning a "Page Not Found" error? javascript:(function(){window.open('/web/20150910032430/https://my.cozi.com/meals/?action=add&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title));})()

被選擇的解決方法

Oh, sorry, I thought it was your site!

The code in that button is broken. Could you delete your current button and re-add it from the following page (scroll down to the Firefox paragraph):

http://www.cozi.com/blog/how-to-save-recipes-from-other-websites-to-cozi/

Based on what I can see without registering for the site, that one has the correct code.

從原來的回覆中察看解決方案 👍 1

所有回覆 (7)

more options

The script has a relative URL. What site is it?

Random thought:

If that is from the Internet Archive's Wayback Machine, it may not work because the site doesn't capture all of the interactive features of the original page.

more options

https://my.cozi.com/homepage/ this is the website. What the heck is The Internet Archive Wayback Machine?

more options

deedledee said

https://my.cozi.com/homepage/ this is the website. What the heck is The Internet Archive Wayback Machine?

Is interesting site plus +++ http://archive.org/web/ every web page made is archived, all most. https://archive.org/ https://en.wikipedia.org/wiki/Wayback_Machine

more options

Okay, so, your script is loading this path:

http(s)://serverhostname/web/20150910032430/https://my.cozi.com/meals/

and passing it some parameters.

Is Firefox filling in what you intended to the left of /web in the URL? Is it is valid URL if you visit it directly rather than via the script?

Is it possible that your script should be this, without the bolded part:

javascript:(function(){window.open('https://my.cozi.com/meals/?action=add&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title));})()

more options

I do not understand half of your questions. It is not my script. It belongs to the website Cozi.com, a recipe collection site. I have no way of changing the script. Why not go to the website, add the button to your toolbar and give it a try on a recipe? I simply wondered if there is a Mozilla config setting that would allow the "Add to Cozi Meals" button to work. This is what url is displayed when I click the "Add to Cozi Meals" button: http://www.myrecipes.com/web/20150910032430/https%3A//my.cozi.com/meals?action=add&title=%22Ham%22%20for%20Two%20Recipe%20%7C%20MyRecipes&url=http%3A//www.myrecipes.com/recipe/ham-for-two

more options

選擇的解決方法

Oh, sorry, I thought it was your site!

The code in that button is broken. Could you delete your current button and re-add it from the following page (scroll down to the Firefox paragraph):

http://www.cozi.com/blog/how-to-save-recipes-from-other-websites-to-cozi/

Based on what I can see without registering for the site, that one has the correct code.

more options

jscher2000 said

Oh, sorry, I thought it was your site! The code in that button is broken. Could you delete your current button and re-add it from the following page (scroll down to the Firefox paragraph): http://www.cozi.com/blog/how-to-save-recipes-from-other-websites-to-cozi/ Based on what I can see without registering for the site, that one has the correct code.

Thanks for this. It was the solution.