Never used tampermonkey/similar before, definitely seems more powerful than good ol' Bookmarklets. Character limits for bookmarks hit you harrd.
@matter9924 жыл бұрын
Very interesting tool!! Thank you!!
@BananaLassi3 жыл бұрын
man u saved me on my project
@ArielVolovik2 жыл бұрын
When (if ever) would you use extensions rather than using Tamper/Grease-monkey
@expirytrader58024 жыл бұрын
Adding script to get autologin would you think be good ?
@anthonywritescode4 жыл бұрын
yeah that could be a thing! I'd be careful about putting passwords into script files though
@expirytrader58024 жыл бұрын
@@anthonywritescode won't be doing it! thanks for the reply
@Jakub1989YTb4 жыл бұрын
Damn, that's usefull!! Thanks a lot :-) This may make me hate JS a little bit less :D
@horseinthesky4 жыл бұрын
Thanks. Very intersting tool. But why in my case border doesn't work? In console I see "ERROR: Execution of script 'Border' failed! Cannot read property 'style' of null".
@anthonywritescode4 жыл бұрын
without seeing your script I can only guess :( -- sometimes you need to `@grant` additional permissions
@horseinthesky4 жыл бұрын
@@anthonywritescode It is as minimal as possible // ==UserScript== // @name Border // @match 192.168.0.1/cgi-bin/luci/* // ==/UserScript== (function() { 'use strict'; let wan = document.getElementById("cbi-network-wan"); wan.style.outline = "#f00 solid 5px"; })(); I can enter there two commands in the console on the page and it works perfectly fine. But the script fails.
@anthonywritescode4 жыл бұрын
ah you might need to set your callback to onload instead (since user scripts run on readystate iirc?) -- this is (for instance) why I insert a stylesheet instead of trying to modify the item directly I believe you can do that with `// @run-at document-idle`
@horseinthesky4 жыл бұрын
@@anthonywritescodeI've checked docs and it says 'document-idle' is the default. I've also checked 'document-body' and 'document-end' with no success. I'm afraid I'm a complete noob in JS. How can I try to insert a stylesheet as you did for this example?
@anthonywritescode4 жыл бұрын
hmmm interesting, here's similar code to what's in the video: ``` let style = document.createElement('style'); style.innerText = ` #cbi-network-wan { outline: 5px solid #f00; } `; document.body.appendChild(style) ```
@everywan Жыл бұрын
I used to use Greasemonkey for my site scripting needs and Stylish for customize the css of a website but I've moved to FireMonkey, since it can do both.
@anthonywritescode Жыл бұрын
I use grease monkey for css as well so you might be holding it wrong