Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

JavaScript Function

  • 7 replies
  • 1 has this problem
  • 466 views
  • Last reply by 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));})()

Chosen solution

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.

Read this answer in context 👍 1

All Replies (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

Chosen Solution

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.