tblop

Reddit-Autsub-If-NSFW_jQuery

Dec 11th, 2017
2,186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Auto-sub to subreddit if NSFW
  3. // @namespace    https://www.tblop.com
  4. // @version      1.0.3
  5. // @description  When on a nsfw 18+ subreddit, auto clicks subscribe button if not subscribed, also adds a handy tblop link above subreddit title
  6. // @author       Greg from TBLOP.com
  7. // @match        https://www.reddit.com/r/*
  8. // @grant        none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12.     'use strict';
  13.     if ($(".nsfw-stamp").length > 10) {
  14.         if ($('.subscribe-button .option.add.active')) {
  15.             $('.subscribe-button').find('.option.add').click();
  16.         }
  17.         $(".titlebox").prepend('<a href="https://www.tblop.com" style="font-size:15px;text-align:right;letter-spacing:1px;margin-bottom:4px;">[ Load TBLOP ]</a>');
  18.     }
  19.  
  20. })();
Add Comment
Please, Sign In to add comment