Guest User

Shut the hell up Dropbox and let me download

a guest
May 31st, 2015
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        Dropbox DL link deshiter
  3. // @namespace   FuckYouDropbox
  4. // @include     *
  5. // @version     1
  6. // @grant       none
  7. // ==/UserScript==
  8.  
  9. function isDropboxAndHasDL0(str){
  10.     if(str.indexOf('www.dropbox.com') <= -1) return false;
  11.     if(str.indexOf('?dl=0') <= -1) return false;
  12.     return true;
  13. }
  14.  
  15. var links = document.getElementsByTagName('a');
  16. for (var i=0;i<links.length;i++){
  17.     if(isDropboxAndHasDL0(links[i].href)) links[i].href=links[i].href.replace('?dl=0','?dl=1');
  18. }
Add Comment
Please, Sign In to add comment