• Activity
  • Votes
  • Comments
  • New
  • All activity
  • Showing only topics in ~comp with the tag "userscript qol". Back to normal view / Search all groups
    1. Open external links on ~ in new tabs

      I was missing this feature from Reddit and saw others were as well so I thought I would share a user script I created to solve this issue until it's added (if it's added) // ==UserScript== //...

      I was missing this feature from Reddit and saw others were as well so I thought I would share a user script I created to solve this issue until it's added (if it's added)

      // ==UserScript==
      // @name         Tildes.net: Open external links in new tab
      // @namespace    http://tampermonkey.net/
      // @version      0.1
      // @description  Opens external links on tildes.net in a new tab
      // @author       SleepyGary
      // @match        https://tildes.net/*
      // @grant        none
      // ==/UserScript==
      
      (function() {
          'use strict';
      
          document.querySelectorAll('a').forEach(el => {
              if (!el.href.includes('tildes.net') && el.href !== '') {
                  el.target = "_blank";
              }
          });
      })();
      
      14 votes