reklatsmasters / letitbitjs

// ==UserScript==
// @name           letitbitjs
// @description    Helper for letitbit.net, vip-file.com, shareflare.net
// @version        1.0.0
// @date           2015-02-09
// @author         ReklatsMasters
// @homepageURL    https://github.com/ReklatsMasters/letitbitjs
// @updateURL      https://openuserjs.org/install/ReklatsMasters/letitbitjs.user.js
// @include        http://letitbit.net/download*
// @include        http://*.letitbit.net/download*
// @include        http://vip-file.com/download*
// @include        http://*.vip-file.com/download*
// @include        http://shareflare.net/download*
// @include        http://*.shareflare.net/download*
// @grant          GM_xmlhttpRequest
// @icon           http://images.letitbit.net/favicon.ico
// @license        MIT
// @copyright      2015, ReklatsMasters (https://github.com/ReklatsMasters)
// ==/UserScript==

!function t(r,e,n){function o(s,a){if(!e[s]){if(!r[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var f=new Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var h=e[s]={exports:{}};r[s][0].call(h.exports,function(t){var e=r[s][1][t];return o(e?e:t)},h,h.exports,t,r,e,n)}return e[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(t){"use strict";function r(t,r){var e=[];return e.push("kAY54boSH+"),e.push(t.split("/").slice(0,-1).join("/")+"/"),e.push(r),e.push(50),e.push("gUnS60oleO^"),s(s(e.join("|")))}function e(t){var e=s(Math.random().toString()),n={action:"LINK_GET_DIRECT",link:t,appid:e,version:3,free_link:1,sh:r(t,e),sp:50};return Object.keys(n).map(function(t){return t+"="+n[t]}).join("&")}function n(t){var r=document.createElement("a");r.href=t,r.className="highlight-s",r.textContent="download",r.style.textTransform="uppercase",r.style.font="400 20px/2 Tahoma, Arial, sans-serif",r.style.display="block",r.target="_blank";var e=document.getElementById("page-content").firstChild;e.parentNode.insertBefore(r,e);var n='<iframe frameborder="0" allowtransparency="true" scrolling="no" src="https://money.yandex.ru/embed/small.xml?account=41001781731116&quickpay=small&any-card-payment-type=on&button-text=06&button-size=m&button-color=black&targets=UserJS&default-sum=50&successURL=" width="212" height="42"></iframe>',o=new DOMParser,i=o.parseFromString(n,"text/html");e.parentNode.insertBefore(i.body.firstChild,e)}function o(){var t=document.getElementById("link_for_downloader");return t?t.value:location.href}function i(){GM_xmlhttpRequest({method:"POST",url:"http://api.letitbit.net/internal/index4.php",data:e(o()),headers:{"Content-Type":"application/x-www-form-urlencoded","User-Agent":""},onload:function(t){var r=t.responseText.split("\n");"ok"==r[0].toLowerCase()?n(r[2]):console.log("что-то пошло не так...",r)},onerror:function(){console.error("error")}})}var s=t("./lib/md5");window.addEventListener("DOMContentLoaded",i,!1),window.prompt=null},{"./lib/md5":2}],2:[function(t,r){"use strict";var e=t("spark-md5");r.exports=function(t){return e.hash(t)}},{"spark-md5":3}],3:[function(t,r,e){!function(t){if("object"==typeof e)r.exports=t();else if("function"==typeof define&&define.amd)define(t);else{var n;try{n=window}catch(o){n=self}n.SparkMD5=t()}}(function(){"use strict";var t=function(t,r){return t+r&4294967295},r=function(r,e,n,o,i,s){return e=t(t(e,r),t(o,s)),t(e<<i|e>>>32-i,n)},e=function(t,e,n,o,i,s,a){return r(e&n|~e&o,t,e,i,s,a)},n=function(t,e,n,o,i,s,a){return r(e&o|n&~o,t,e,i,s,a)},o=function(t,e,n,o,i,s,a){return r(e^n^o,t,e,i,s,a)},i=function(t,e,n,o,i,s,a){return r(n^(e|~o),t,e,i,s,a)},s=function(r,s){var a=r[0],u=r[1],f=r[2],h=r[3];a=e(a,u,f,h,s[0],7,-680876936),h=e(h,a,u,f,s[1],12,-389564586),f=e(f,h,a,u,s[2],17,606105819),u=e(u,f,h,a,s[3],22,-1044525330),a=e(a,u,f,h,s[4],7,-176418897),h=e(h,a,u,f,s[5],12,1200080426),f=e(f,h,a,u,s[6],17,-1473231341),u=e(u,f,h,a,s[7],22,-45705983),a=e(a,u,f,h,s[8],7,1770035416),h=e(h,a,u,f,s[9],12,-1958414417),f=e(f,h,a,u,s[10],17,-42063),u=e(u,f,h,a,s[11],22,-1990404162),a=e(a,u,f,h,s[12],7,1804603682),h=e(h,a,u,f,s[13],12,-40341101),f=e(f,h,a,u,s[14],17,-1502002290),u=e(u,f,h,a,s[15],22,1236535329),a=n(a,u,f,h,s[1],5,-165796510),h=n(h,a,u,f,s[6],9,-1069501632),f=n(f,h,a,u,s[11],14,643717713),u=n(u,f,h,a,s[0],20,-373897302),a=n(a,u,f,h,s[5],5,-701558691),h=n(h,a,u,f,s[10],9,38016083),f=n(f,h,a,u,s[15],14,-660478335),u=n(u,f,h,a,s[4],20,-405537848),a=n(a,u,f,h,s[9],5,568446438),h=n(h,a,u,f,s[14],9,-1019803690),f=n(f,h,a,u,s[3],14,-187363961),u=n(u,f,h,a,s[8],20,1163531501),a=n(a,u,f,h,s[13],5,-1444681467),h=n(h,a,u,f,s[2],9,-51403784),f=n(f,h,a,u,s[7],14,1735328473),u=n(u,f,h,a,s[12],20,-1926607734),a=o(a,u,f,h,s[5],4,-378558),h=o(h,a,u,f,s[8],11,-2022574463),f=o(f,h,a,u,s[11],16,1839030562),u=o(u,f,h,a,s[14],23,-35309556),a=o(a,u,f,h,s[1],4,-1530992060),h=o(h,a,u,f,s[4],11,1272893353),f=o(f,h,a,u,s[7],16,-155497632),u=o(u,f,h,a,s[10],23,-1094730640),a=o(a,u,f,h,s[13],4,681279174),h=o(h,a,u,f,s[0],11,-358537222),f=o(f,h,a,u,s[3],16,-722521979),u=o(u,f,h,a,s[6],23,76029189),a=o(a,u,f,h,s[9],4,-640364487),h=o(h,a,u,f,s[12],11,-421815835),f=o(f,h,a,u,s[15],16,530742520),u=o(u,f,h,a,s[2],23,-995338651),a=i(a,u,f,h,s[0],6,-198630844),h=i(h,a,u,f,s[7],10,1126891415),f=i(f,h,a,u,s[14],15,-1416354905),u=i(u,f,h,a,s[5],21,-57434055),a=i(a,u,f,h,s[12],6,1700485571),h=i(h,a,u,f,s[3],10,-1894986606),f=i(f,h,a,u,s[10],15,-1051523),u=i(u,f,h,a,s[1],21,-2054922799),a=i(a,u,f,h,s[8],6,1873313359),h=i(h,a,u,f,s[15],10,-30611744),f=i(f,h,a,u,s[6],15,-1560198380),u=i(u,f,h,a,s[13],21,1309151649),a=i(a,u,f,h,s[4],6,-145523070),h=i(h,a,u,f,s[11],10,-1120210379),f=i(f,h,a,u,s[2],15,718787259),u=i(u,f,h,a,s[9],21,-343485551),r[0]=t(a,r[0]),r[1]=t(u,r[1]),r[2]=t(f,r[2]),r[3]=t(h,r[3])},a=function(t){var r,e=[];for(r=0;64>r;r+=4)e[r>>2]=t.charCodeAt(r)+(t.charCodeAt(r+1)<<8)+(t.charCodeAt(r+2)<<16)+(t.charCodeAt(r+3)<<24);return e},u=function(t){var r,e=[];for(r=0;64>r;r+=4)e[r>>2]=t[r]+(t[r+1]<<8)+(t[r+2]<<16)+(t[r+3]<<24);return e},f=function(t){var r,e,n,o,i,u,f=t.length,h=[1732584193,-271733879,-1732584194,271733878];for(r=64;f>=r;r+=64)s(h,a(t.substring(r-64,r)));for(t=t.substring(r-64),e=t.length,n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=0;e>r;r+=1)n[r>>2]|=t.charCodeAt(r)<<(r%4<<3);if(n[r>>2]|=128<<(r%4<<3),r>55)for(s(h,n),r=0;16>r;r+=1)n[r]=0;return o=8*f,o=o.toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(o[2],16),u=parseInt(o[1],16)||0,n[14]=i,n[15]=u,s(h,n),h},h=function(t){var r,e,n,o,i,a,f=t.length,h=[1732584193,-271733879,-1732584194,271733878];for(r=64;f>=r;r+=64)s(h,u(t.subarray(r-64,r)));for(t=f>r-64?t.subarray(r-64):new Uint8Array(0),e=t.length,n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=0;e>r;r+=1)n[r>>2]|=t[r]<<(r%4<<3);if(n[r>>2]|=128<<(r%4<<3),r>55)for(s(h,n),r=0;16>r;r+=1)n[r]=0;return o=8*f,o=o.toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(o[2],16),a=parseInt(o[1],16)||0,n[14]=i,n[15]=a,s(h,n),h},c=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],p=function(t){var r,e="";for(r=0;4>r;r+=1)e+=c[t>>8*r+4&15]+c[t>>8*r&15];return e},l=function(t){var r;for(r=0;r<t.length;r+=1)t[r]=p(t[r]);return t.join("")},d=function(t){return l(f(t))},y=function(){this.reset()};return"5d41402abc4b2a76b9719d911017c592"!==d("hello")&&(t=function(t,r){var e=(65535&t)+(65535&r),n=(t>>16)+(r>>16)+(e>>16);return n<<16|65535&e}),y.prototype.append=function(t){return/[\u0080-\uFFFF]/.test(t)&&(t=unescape(encodeURIComponent(t))),this.appendBinary(t),this},y.prototype.appendBinary=function(t){this._buff+=t,this._length+=t.length;var r,e=this._buff.length;for(r=64;e>=r;r+=64)s(this._state,a(this._buff.substring(r-64,r)));return this._buff=this._buff.substr(r-64),this},y.prototype.end=function(t){var r,e,n=this._buff,o=n.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(r=0;o>r;r+=1)i[r>>2]|=n.charCodeAt(r)<<(r%4<<3);return this._finish(i,o),e=t?this._state:l(this._state),this.reset(),e},y.prototype._finish=function(t,r){var e,n,o,i=r;if(t[i>>2]|=128<<(i%4<<3),i>55)for(s(this._state,t),i=0;16>i;i+=1)t[i]=0;e=8*this._length,e=e.toString(16).match(/(.*?)(.{0,8})$/),n=parseInt(e[2],16),o=parseInt(e[1],16)||0,t[14]=n,t[15]=o,s(this._state,t)},y.prototype.reset=function(){return this._buff="",this._length=0,this._state=[1732584193,-271733879,-1732584194,271733878],this},y.prototype.destroy=function(){delete this._state,delete this._buff,delete this._length},y.hash=function(t,r){/[\u0080-\uFFFF]/.test(t)&&(t=unescape(encodeURIComponent(t)));var e=f(t);return r?e:l(e)},y.hashBinary=function(t,r){var e=f(t);return r?e:l(e)},y.ArrayBuffer=function(){this.reset()},y.ArrayBuffer.prototype.append=function(t){var r,e=this._concatArrayBuffer(this._buff,t),n=e.length;for(this._length+=t.byteLength,r=64;n>=r;r+=64)s(this._state,u(e.subarray(r-64,r)));return this._buff=n>r-64?e.subarray(r-64):new Uint8Array(0),this},y.ArrayBuffer.prototype.end=function(t){var r,e,n=this._buff,o=n.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(r=0;o>r;r+=1)i[r>>2]|=n[r]<<(r%4<<3);return this._finish(i,o),e=t?this._state:l(this._state),this.reset(),e},y.ArrayBuffer.prototype._finish=y.prototype._finish,y.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._state=[1732584193,-271733879,-1732584194,271733878],this},y.ArrayBuffer.prototype.destroy=y.prototype.destroy,y.ArrayBuffer.prototype._concatArrayBuffer=function(t,r){var e=t.length,n=new Uint8Array(e+r.byteLength);return n.set(t),n.set(new Uint8Array(r),e),n},y.ArrayBuffer.hash=function(t,r){var e=h(new Uint8Array(t));return r?e:l(e)},y})},{}]},{},[1]);