The Un-Official Proxomitron Forum
how to include javascript function as a heder ?? - Printable Version

+- The Un-Official Proxomitron Forum (https://www.prxbx.com/forums)
+-- Forum: Proxomitron Filters (/forumdisplay.php?fid=38)
+--- Forum: Filter Help/Request (/forumdisplay.php?fid=31)
+--- Thread: how to include javascript function as a heder ?? (/showthread.php?tid=2118)



how to include javascript function as a heder ?? - caspereg - Sep. 08, 2013 03:21 PM

i found a firefox addon that helps bypassing the download limitation

https://addons.mozilla.org/en-us/firefox/addon/download-unlimited/
the open source for the addon
https://github.com/rumal/Download-Unlimited

this firefox addon modify the http Header Request
it modify the range to the allowed range
by this function
PHP Code:
    // if the range header is set by the downloadThemAll
var range httpChannel.getRequestHeader('Range');
lowRange range.substring(6,range.length-1);
var 
upRange parseInt(lowRange) + download_unlimited.step;
//change it to the allowed range
httpChannel.setRequestHeader('Range','bytes='+lowRange+'-'+upRange,false);
range httpChannel.getRequestHeader('Range'); 
https://github.com/rumal/Download-Unlimited/blob/master/Download-Unlimited/chrome/content/overlay.js
who can i make a filter that do the same job of this addon