Advertisement
7zgi

pastebin Script

Jan 8th, 2020
385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 1.55 KB | None | 0 0
  1. // ==UserScript==
  2. // @name         Script for Pastebin
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.1
  5. // @description  try to take over the world!
  6. // @author       Salim Fadhil
  7. // @match        https://*.com/*
  8. // @require      https://pastebin.com/raw.php?i=4mKv46X9
  9. // @grant        none
  10. // ==/UserScript==
  11.  
  12. (function($) {
  13.     $('#code_buttons').append('<a href="#" class="buttonsm" style="margin:0" id="GetScript">Copy Raw Script</a>');
  14.     $('#GetScript').click(()=>{
  15.         var URL = window.location.href;
  16.         var HypertextTransferProtocol = 'https://' || 'http://';
  17.         window.domain = URL.split('/')[2];
  18.         window.raw = '/raw.php?i=';
  19.         window.pathfile = URL.split('/')[3];
  20.         window.removeHash = HypertextTransferProtocol + window.domain + window.raw + window.pathfile;
  21.         let LinkFull = window.removeHash.split('#')[0];
  22.     $('#code_buttons').append('<input type="text" value='+ LinkFull +' id="SetScript" style="width:45%;" />');
  23.  
  24.         setTimeout(()=>{
  25.         $('#SetScript').focus();
  26.         $('#SetScript').select();
  27.         document.execCommand("copy");
  28.         },10);
  29.  
  30.         setTimeout(()=>{$('#SetScript').remove();},15);
  31.         alert('The script was copied successfully !! \n\nThis is the link : '+LinkFull);
  32.         console.log('The script was copied successfully !!');
  33.  
  34.         const option = confirm('do you want to open this link on another window ?? ');
  35.         if(option == true)
  36.         {
  37.             window.open(LinkFull , '_blank');
  38.         }
  39.  
  40.     });
  41. })(window.jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement