// ==UserScript== // @name Zone-Telechargement Download // @name:en Zone-Telechargement Download // @namespace https://www.zone-telechargement.net/ // @version 1.0 // @description Analyse link to show direct link (Uptobox,Uploaded,1fichier ...) on zone-telechargement // @description:en Analyse link to show direct link (Uptobox,Uploaded,1fichier ...) on zone-telechargement // @author zyrex008 // @icon https://www.zone-telechargement.net/templates/Default/images/favicon.ico // @include /http(|s)://(|(|w|0|1|2|3|4|5|6|7|8|9)*w(|w|0|1|2|3|4|5|6|7|8|9)*\.)zone\-telechargement(||1|2|3|4|5|6|7|8|9).(|ws|com|org|net)/.*/ // @match https://www.dl-protect1.com/.* // @include /http(|s)://(|(|w|v)*\.)dl\-protect1.com/ // @include /http(|s)://(|www\.)dl\-protect1\.com/.*/ // @require http://code.jquery.com/jquery-latest.js // @resource customCSS https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css // @grant GM_addStyle // @grant GM_getResourceText // @downloadURL none // ==/UserScript== var newCSS = GM_getResourceText ("customCSS"); GM_addStyle (newCSS); (function() { if ( window.location.origin.match(/dl\-protect/g) != null ) { !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=2)}({2:function(e,t,n){e.exports=n("oh71")},oh71:function(e,t){$(document).ready(function(){$(".lienet").html()?parent.window.postMessage($(".lienet").text(),"https://www.zone-telechargement.net"):$('input[value="Continuer"]').click()})}}); } else { !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=1)}({1:function(e,t,n){e.exports=n("MbU/")},"MbU/":function(e,t,n){window.ClipboardJS=n("sxGJ"),window.localforage=n("oAJy"),$(document).ready(function(){var e=[],t=!1,n='',r='',o='',i='',a='';function c(){return'
'+u()+"
"}function u(){var e='
'+i+"
";return 1==t&&(e='
'+i+"
"),e}function s(){var e="";return e+="Copier automatiquement dans le presse papier : ",e+=1==t?'':''}function f(){$("#dl-protect-option").html(s()),$("#auto-copy-status").html(u())}var l=0;function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(e.length>0){var t=a.replace("__MESSAGE__",e).replace("__ID__",l);$("#zt-download-notification").append(t);var n="#notification_message_"+l;setTimeout(function(){$(n).fadeOut(1e3,function(){$(this).remove()})},2e3),l++}}window.addNotification=d,$(".postinfo").prepend('
'+o+"ZT Download"+c()+'
');var h=0;$(".postinfo").find("form").each(function(e){$(this).attr("target","dl-protect"),$(this).attr("id","form-link-"+h),$(this).append(' "),h++});var v=new ClipboardJS(".btn-clipboard");function p(){var t="";return e.length>0&&(t=" (A traiter : "+e.length+")"),t}function y(){$("#dl-protect-status").html(p())}function b(t){var n=!0;if(e.length>0)for(var r=0;r0&&e[0]!=$("#dl-protect").attr("data-id")&&($("#form-analyser-"+e[0]).addClass("bg-yellow-500 hover:bg-yellow-700").removeClass("bg-orange-500 hover:bg-orange-700").html(n),$("#dl-protect").attr("data-id",e[0]),$("#form-link-"+e[0]).attr("target","dl-protect"),$("#form-link-"+e[0]).submit())}function m(){y(),e.length>0&&($("#form-analyser-"+e[0]).addClass("bg-green-500 hover:bg-green-700").removeClass("bg-yellow-500 hover:bg-yellow-700").html(r),$("#dl-protect").attr("data-id",""),e.shift(),0==e.length&&d("Traitement fini"),y(),g())}function w(e){if("https://www.dl-protect1.com"==e.origin){var n=$("#dl-protect").attr("data-id");$("#form-span-"+n).attr("href",e.data),$("#form-span-"+n).text(e.data),$("#form-copy-"+n).attr("data-clipboard-text",e.data.trim()).removeClass("hidden"),1==t&&$("#form-copy-"+n).click(),m()}}v.on("success",function(e){d('Copie de "'+e.text+'"')}),v.on("error",function(e){console.error("Action:",e.action),console.error("Trigger:",e.trigger),d("Erreur lors de la copie")}),$(".postinfo").find(".masha_index").each(function(e){"DIV"==$(this).parent().get(0).tagName&&($(this).parent().parent().addClass("b-analyser-group"),$(this).parent().append('"))}),$(".postinfo").on("click",".btn-analyser",function(e){e.preventDefault(),e.stopPropagation(),b($(this).attr("data-id"))}),$(".postinfo").on("click",".btn-analyser-group",function(e){d("Analyse du groupe");var t=$(this).parent().parent(),n=!0;do{void 0!==(t=t.next()).get(0)?"B"==t.get(0).tagName&&("undefined"!=t.get(0)&&"b-analyser-group"!=t.attr("class")?t.find(".btn-analyser").each(function(e){b($(this).attr("data-id"))}):n=!1):n=!1}while(1==n)}),$("#analyse-tout").click(function(e){d("Analyse de tout les elements");for(var t=0;t',r=600,i=400,$("#dl-protect-option").removeClass("hidden")):$("#dl-protect-option").addClass("hidden"),$(this).attr("data-show",t).find("div").html(n+"ZT Download"+c()+''+p()+""),$("#dl-protect").css("width",r+"px"),$("#dl-protect").css("height",i+"px")}),$("#dl-protect-option").on("click",".btn-dl-protect-option-copy",function(e){console.log("dl-protect-option-copy",t),localforage.setItem("zt-download-auto-copy",!t,function(e){localforage.getItem("zt-download-auto-copy",function(e,n){t=n,f()})})}),window.endTraitment=m,window.addEventListener?window.addEventListener("message",w,!1):window.attachEvent("onmessage",w),localforage.getItem("zt-download-auto-copy",function(e,n){t=n,f()})})},oAJy:function(e,t,n){(function(t){var n;e.exports=function e(t,r,o){function i(c,u){if(!r[c]){if(!t[c]){var s="function"==typeof n&&n;if(!u&&s)return n(c,!0);if(a)return a(c,!0);var f=new Error("Cannot find module '"+c+"'");throw f.code="MODULE_NOT_FOUND",f}var l=r[c]={exports:{}};t[c][0].call(l.exports,function(e){var n=t[c][1][e];return i(n||e)},l,l.exports,e,t,r,o)}return r[c].exports}for(var a="function"==typeof n&&n,c=0;c=43)}}).catch(function(){return!1})}(e).then(function(e){return d=e})}function g(e){var t=h[e.name],n={};n.promise=new a(function(e,t){n.resolve=e,n.reject=t}),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then(function(){return n.promise}):t.dbReady=n.promise}function m(e){var t=h[e.name],n=t.deferredOperations.pop();if(n)return n.resolve(),n.promise}function w(e,t){var n=h[e.name],r=n.deferredOperations.pop();if(r)return r.reject(t),r.promise}function _(e,t){return new a(function(n,r){if(h[e.name]=h[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return n(e.db);g(e),e.db.close()}var i=[e.name];t&&i.push(e.version);var a=o.open.apply(o,i);t&&(a.onupgradeneeded=function(t){var n=a.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(l)}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),a.onerror=function(e){e.preventDefault(),r(a.error)},a.onsuccess=function(){n(a.result),m(e)}})}function x(e){return _(e,!1)}function S(e){return _(e,!0)}function E(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.versione.db.version;if(r&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),o||n){if(n){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function I(e){var t=function(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),o=0;o0&&(!e.db||"InvalidStateError"===o.name||"NotFoundError"===o.name))return a.resolve().then(function(){if(!e.db||"NotFoundError"===o.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),S(e)}).then(function(){return function(e){g(e);for(var t=h[e.name],n=t.forages,r=0;r>4,f[u++]=(15&r)<<4|o>>2,f[u++]=(3&o)<<6|63&i;return s}function Q(e){var t,n=new Uint8Array(e),r="";for(t=0;t>2],r+=O[(3&n[t])<<4|n[t+1]>>4],r+=O[(15&n[t+1])<<2|n[t+2]>>6],r+=O[63&n[t+2]];return n.length%3==2?r=r.substring(0,r.length-1)+"=":n.length%3==1&&(r=r.substring(0,r.length-2)+"=="),r}var X={serialize:function(e,t){var n="";if(e&&(n=J.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===J.call(e.buffer))){var r,o=R;e instanceof ArrayBuffer?(r=e,o+=M):(r=e.buffer,"[object Int8Array]"===n?o+=B:"[object Uint8Array]"===n?o+=z:"[object Uint8ClampedArray]"===n?o+=F:"[object Int16Array]"===n?o+=$:"[object Uint16Array]"===n?o+=H:"[object Int32Array]"===n?o+=P:"[object Uint32Array]"===n?o+=U:"[object Float32Array]"===n?o+=q:"[object Float64Array]"===n?o+=W:t(new Error("Failed to get type for BinaryArray"))),t(o+Q(r))}else if("[object Blob]"===n){var i=new FileReader;i.onload=function(){var n=T+e.type+"~"+Q(this.result);t(R+L+n)},i.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error("Couldn't convert value into a JSON string: ",e),t(null,n)}},deserialize:function(e){if(e.substring(0,D)!==R)return JSON.parse(e);var t,n=e.substring(V),r=e.substring(D,V);if(r===L&&C.test(n)){var o=n.match(C);t=o[1],n=n.substring(o[0].length)}var a=G(n);switch(r){case M:return a;case L:return i([a],{type:t});case B:return new Int8Array(a);case z:return new Uint8Array(a);case F:return new Uint8ClampedArray(a);case $:return new Int16Array(a);case H:return new Uint16Array(a);case P:return new Int32Array(a);case U:return new Uint32Array(a);case q:return new Float32Array(a);case W:return new Float64Array(a);default:throw new Error("Unkown type: "+r)}},stringToBuffer:G,bufferToString:Q};function K(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function Y(e,t,n,r,o,i){e.executeSql(n,r,o,function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],function(e,c){c.rows.length?i(e,a):K(e,t,function(){e.executeSql(n,r,o,i)},i)},i):i(e,a)},i)}var Z={_driver:"webSQLStorage",_initStorage:function(e){var t=this,n={db:null};if(e)for(var r in e)n[r]="string"!=typeof e[r]?e[r].toString():e[r];var o=new a(function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return r(e)}n.db.transaction(function(o){K(o,n,function(){t._dbInfo=n,e()},function(e,t){r(t)})},r)});return n.serializer=X,o},_support:"function"==typeof openDatabase,iterate:function(e,t){var n=this,r=new a(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){Y(n,o,"SELECT * FROM "+o.storeName,[],function(n,r){for(var i=r.rows,a=i.length,c=0;c0)return void a(e.apply(i,[t,u,r,o-1]));c(n)}})})}).catch(c)});return c(u,r),u}.apply(this,[e,t,n,1])},removeItem:function(e,t){var n=this;e=s(e);var r=new a(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){Y(n,o,"DELETE FROM "+o.storeName+" WHERE key = ?",[e],function(){t()},function(e,t){r(t)})})}).catch(r)});return c(r,t),r},clear:function(e){var t=this,n=new a(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){Y(t,r,"DELETE FROM "+r.storeName,[],function(){e()},function(e,t){n(t)})})}).catch(n)});return c(n,e),n},length:function(e){var t=this,n=new a(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){Y(t,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],function(t,n){var r=n.rows.item(0).c;e(r)},function(e,t){n(t)})})}).catch(n)});return c(n,e),n},key:function(e,t){var n=this,r=new a(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){Y(n,o,"SELECT key FROM "+o.storeName+" WHERE id = ? LIMIT 1",[e+1],function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)},function(e,t){r(t)})})}).catch(r)});return c(r,t),r},keys:function(e){var t=this,n=new a(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){Y(t,r,"SELECT key FROM "+r.storeName,[],function(t,n){for(var r=[],o=0;o '__WebKitDatabaseInfoTable__'",[],function(n,r){for(var o=[],i=0;i0}var ne={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var n in e)t[n]=e[n];return t.keyPrefix=ee(e,this._defaultConfig),te()?(this._dbInfo=t,t.serializer=X,a.resolve()):a.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var n=this,r=n.ready().then(function(){for(var t=n._dbInfo,r=t.keyPrefix,o=r.length,i=localStorage.length,a=1,c=0;c=0;n--){var r=localStorage.key(n);0===r.indexOf(e)&&localStorage.removeItem(r)}});return c(n,e),n},length:function(e){var t=this.keys().then(function(e){return e.length});return c(t,e),t},key:function(e,t){var n=this,r=n.ready().then(function(){var t,r=n._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(r.keyPrefix.length)),t});return c(r,t),r},keys:function(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo,n=localStorage.length,r=[],o=0;o=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}}):a.reject("Invalid arguments"),t),r}},re=function(e,t){for(var n=e.length,r=0;r0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===r(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=(0,c.default)(e,"click",function(e){return t.onClick(e)})}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new i.default({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return f("action",e)}},{key:"defaultTarget",value:function(e){var t=f("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return f("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach(function(e){n=n&&!!document.queryCommandSupported(e)}),n}}]),t}();function f(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}e.exports=s},function(e,t,n){"use strict";var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[t?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,c.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,c.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==(void 0===e?"undefined":o(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]),e}();e.exports=u},function(e,t){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var r=window.getSelection(),o=document.createRange();o.selectNodeContents(e),r.removeAllRanges(),r.addRange(o),t=r.toString()}return t}},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r