SHARE
TWEET

Shut the hell up Dropbox and let me download

a guest May 31st, 2015 257 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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top