customize ANY website (beginner - intermediate) anthony explains

  Рет қаралды 1,027

anthonywritescode

anthonywritescode

Күн бұрын

Пікірлер: 19
@Itwasmeeeeeee
@Itwasmeeeeeee 4 жыл бұрын
thanks, big potential
@goodclover
@goodclover 4 жыл бұрын
Never used tampermonkey/similar before, definitely seems more powerful than good ol' Bookmarklets. Character limits for bookmarks hit you harrd.
@matter992
@matter992 4 жыл бұрын
Very interesting tool!! Thank you!!
@BananaLassi
@BananaLassi 3 жыл бұрын
man u saved me on my project
@ArielVolovik
@ArielVolovik 2 жыл бұрын
When (if ever) would you use extensions rather than using Tamper/Grease-monkey
@expirytrader5802
@expirytrader5802 4 жыл бұрын
Adding script to get autologin would you think be good ?
@anthonywritescode
@anthonywritescode 4 жыл бұрын
yeah that could be a thing! I'd be careful about putting passwords into script files though
@expirytrader5802
@expirytrader5802 4 жыл бұрын
@@anthonywritescode won't be doing it! thanks for the reply
@Jakub1989YTb
@Jakub1989YTb 4 жыл бұрын
Damn, that's usefull!! Thanks a lot :-) This may make me hate JS a little bit less :D
@horseinthesky
@horseinthesky 4 жыл бұрын
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".
@anthonywritescode
@anthonywritescode 4 жыл бұрын
without seeing your script I can only guess :( -- sometimes you need to `@grant` additional permissions
@horseinthesky
@horseinthesky 4 жыл бұрын
@@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.
@anthonywritescode
@anthonywritescode 4 жыл бұрын
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`
@horseinthesky
@horseinthesky 4 жыл бұрын
@@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?
@anthonywritescode
@anthonywritescode 4 жыл бұрын
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
@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
@anthonywritescode Жыл бұрын
I use grease monkey for css as well so you might be holding it wrong
oops I'm the pyuwsgi maintainer now (intermediate) anthony explains #579
22:55
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
how do I make an empty generator? (intermediate) anthony explains #577
7:38
debugging a broken cache!
21:16
anthonywritescode
Рет қаралды 4,3 М.
faster git recloning* (intermediate) anthony explains #578
6:17
anthonywritescode
Рет қаралды 2,7 М.
simplifying sorting! (all code sucks) #09
6:36
anthonywritescode
Рет қаралды 7 М.
python warnings got way better in 3.12!
8:16
anthonywritescode
Рет қаралды 3,9 М.
be careful with NoReturn / Never! (all code sucks) #11
7:19
anthonywritescode
Рет қаралды 5 М.
how does python's module `__getattr__` actually work?
17:38
anthonywritescode
Рет қаралды 6 М.
debugging and fixing pyuwsgi in python 3.12 (advanced) anthony explains #580
1:00:01
debugging flaky cascading failure after upgrading pytest!
26:15
anthonywritescode
Рет қаралды 3,8 М.