0

Is there an addon for Chrome browser, that allows user to save javascript codes and run these code on a page by clicking a toolbar icon (addons itself) or a keyboard shortcut assigned to jquery codes ?

I mean, I want to save some small javascript codes and run one of these codes on specific pages by pressing a button or a keyboard shortcut.

Can
  • 659
  • 1
  • 7
  • 24
  • I edited the question. Addon should save codes and enable user to run it somehow. – Can Sep 14 '15 at 11:40
  • Are you looking for a recommendation for such an extension? SO doesn't do that. It wouldn't be too difficult to create such an extension. But SO doesn't do that either. When you've created such an extension but you're having trouble figuring out a particular part, then SO is good at helping. Until then, there's not much we can/will do. – Teepeemm Sep 14 '15 at 14:23

1 Answers1

1

look at bookmarklets. chrome supports them and you can run javascript (limited by content security rules) on any page by just clicking the bookmarklet in your bookmarks.

Zig Mandel
  • 19,571
  • 5
  • 26
  • 36
  • I created a bookmarklet and added to bookmarks bar. Then i wanted to run this script on web site by clicking on it. Web page says: Refused to load the script 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' ...... – Can Sep 15 '15 at 06:31
  • yes you have to follow content security rules. don't load libraries to reduce complexity. – Zig Mandel Sep 15 '15 at 12:23
  • this means i cannot run this script on this website? Or should i change my code to run ? – Can Sep 15 '15 at 12:24