this post was submitted on 19 Jul 2023
742 points (98.2% liked)
Asklemmy
44835 readers
6 users here now
A loosely moderated place to ask open-ended questions
Search asklemmy π
If your post meets the following criteria, it's welcome here!
- Open-ended question
- Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
- Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
- Not ad nauseam inducing: please make sure it is a question that would be new to most members
- An actual topic of discussion
Looking for support?
Looking for a community?
- Lemmyverse: community search
- sub.rehab: maps old subreddits to fediverse options, marks official as such
- !lemmy411@lemmy.ca: a community for finding communities
~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Step 1: In FireFox, make a new bookmark with the location:
javascript:(function(w){ var arr = ['contextmenu','copy','cut','paste','mousedown','mouseup','beforeunload','beforeprint']; for(var i = 0, x; x = arr[i]; i++){ if(w['on' + x])w['on' + x] = null; w.addEventListener(x, function(e){e.stopPropagation()}, true); }; for(var j = 0, f; f = w.frames[j]; j++){try{arguments.callee(f)}catch(e){}}})(window);
Step 2: Drag the bookmark to your toolbar.
Step 3: ??? ::: When a website does bullshit like not allow you to paste, not allow you to right click, etc. Click the button you made in step 2. :::
Step 4: Profit
It is your browser, your computer. You decide what code runs on it.
Bonus Step: Install something like ublock origin or noscript and stop allowing websites to run any code they like willy nilly on your PC without permission. Half of that crap just tracks you for no real benefit (to you).
How would step 1 work if you ELI5
It overrides the events that websites use to disable the operations (right click, copy, paste etc.) With code that stops the website's code running.
Essentially restoring their default functionality.
Clicking the bookmark executes the JavaScript.