What's a simple way in Google Chrome to insert Javascript into sites?

后端 未结 7 2079
执念已碎
执念已碎 2021-02-01 06:11

I would like to be able to add custom snippets of javascript to any site that matches a regex. This is mostly because of sites that I use daily because of specialized content, b

相关标签:
7条回答
  • 2021-02-01 06:20

    Another alternative that neatly solves the problem is Custom JavaScript for websites. You just need to install the extension, which takes around 2 seconds, and then you can immediately start typing your custom JavaScript for the specified website.

    The extension automatically recognizes the current website, so all you need to do is write your code and click on Save. You can also easily import jQuery or your external scripts for convenience.

    0 讨论(0)
  • 2021-02-01 06:22

    The answer was Tampermonkey.

    https://chrome.google.com/webstore/detail/dhdgffkkebhmkfjojejmpbldmpobfkfo

    0 讨论(0)
  • 2021-02-01 06:22

    Why not dotjs http://defunkt.io/dotjs/ ? It's local, you can version it with git, you can easily take it to another computer...

    0 讨论(0)
  • 2021-02-01 06:28

    Snippets are available directly in Chrome Devtools

    https://developers.google.com/web/tools/chrome-devtools/javascript/snippets

    0 讨论(0)
  • 2021-02-01 06:30

    What you're looking for is Greasemonkey. But wait, Greasemonkey is for Firefox only, right? Turns out, you can install Greasemonkey user-scripts as native Chrome add-ons. Just go to userscripts.org and hit the Install button on one of them, and Chrome will automatically convert it into a native add-on. Then, write your own and install it using Chrome.

    Note: This only works in Chrome 4.0.

    0 讨论(0)
  • 2021-02-01 06:34

    Custom JavaScript for Websites 2 is an alternative to Custom JavaScript for Websites, with some bug fixes and sync scripts across devices feature.

    0 讨论(0)
提交回复
热议问题