NoMoRickRoll

Stop That Rickroll!

当前为 2016-06-28 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name NoMoRickRoll
  3. // @namespace www.StuffBySpencer.com
  4. // @version 0.3
  5. // @description Stop That Rickroll!
  6. // @author StuffBySpencer
  7. // @include https://www.reddit.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. var linkList = document.getElementsByTagName( 'a' );
  15. for( var i = 0; i < linkList.length; i++ ){
  16. var link = linkList[ i ].href.toString();
  17. if( link.indexOf( 'dQw4w9WgXcQ' ) > -1 || link.indexOf( 'X9NOzYMLfmM' ) > -1 || link.indexOf( '6_b7RDuLwcI' ) > -1 || link.indexOf( 'm2ATf01v4hw' ) > -1 || link.indexOf( 'IC5YozmvPpM' ) > -1 || link.indexOf( 'IAISUDbjXj0' ) > -1 || link.indexOf( 'rZRb_JeBLus' ) > -1 || link.indexOf( '9NcPvmk4vfo' ) > -1 || link.indexOf( 'VzuDnbjIhbg' ) > -1 || link.indexOf( 'DLzxrzFCyOs' ) > -1 || link.indexOf( 'dQw4w9WgXcT' ) > -1 || link.indexOf( 'dQw4w9WgXcQ' ) > -1 || link.indexOf( 'dQw4w9WgXcR' ) > -1 ){
  18. linkList[ i ].innerHTML = linkList[ i ].innerHTML + '<p style="background-color: #333; color: #eee; font-weight: bold; font-size: 1.23em; font-style: italic; display: inline;" >!POSSIBLE RICKROLL!</p>';
  19. }else if( link.indexOf( 'TMjyJfqOlbI' ) > -1 ){
  20. linkList[ i ].innerHTML = linkList[ i ].innerHTML + '<p style="background-color: #eee; color: #333; font-weight: bold; font-size: 1.23em; font-style: italic; display: inline;" >!POSSIBLE DANK RICKETY-ROLLER!</p>';
  21. }else if( link.indexOf( 'S65ykNd9D7c' ) > -1 ){
  22. linkList[ i ].innerHTML = linkList[ i ].innerHTML + '<p style="background-color: #eee; color: #333; font-weight: bold; font-size: 1.23em; font-style: italic; display: inline;" >!POSSIBLE RICKROLL! [ but a live one ]</p>';
  23. }
  24. }
  25. })();