Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- You can paste this into a bookmarklet:
- javascript:(function(){var l=document.getElementsByTagName('a');for(var i=0; i<l.length; i++){if(l[i].href.indexOf('&page=')==-1){l[i].target='_blank';}}window.onscroll = function(){var l=document.getElementsByTagName('a');for(var i=0; i<l.length; i++){if(l[i].href.indexOf('&page=')==-1){l[i].target='_blank';}}};})();
- Or if you use Tampermonkey, here is the full userscript:
- // ==UserScript==
- // @name old.lemmy.world - Open Links in New Tab/Window
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description Emulates Reddit's behavior when "open in new tab" is checked.
- // @author /u/Supervisor194
- // @match https://old.lemmy.world/*
- // @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
- // @grant none
- // ==/UserScript==
- (function() {
- // Your code here...
- var l=document.getElementsByTagName('a');
- for(var i=0; i<l.length; i++){
- if(l[i].href.indexOf('&page=')==-1){
- l[i].target='_blank';
- }
- }
- window.onscroll = function(){
- var l=document.getElementsByTagName('a');
- for(var i=0; i<l.length; i++){
- if(l[i].href.indexOf('&page=')==-1){
- l[i].target='_blank';
- }
- }
- }
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement