Search code examples
javascriptjqueryhtmldombookmarklet

javascript not running. Firebug says "reload the page to get source for: ..."


I am trying to develop a bookmarklet which add some javascript elements to head of webpage. But I noticed that one of them is not loading. enter image description here

Is there is some way to overcome this problem. Is it possible to reload page without loosing appended scripts?


Solution

  • Really sorry for such a silly question!! Actually its not about localStorage or something like that. It is a browser security issue. Here the javascript file which is showing this message is actually on HTTP not HTTPS. But webpage is using HTTPS. So when I try to load that file, browser prevent it from loading.

    Simple solution is to give this javascript source a HTTPS URL like put it on Google drive and make file public then copy its GoogleDrive host URL.