diff --git a/build/userscript.js b/build/userscript.js index 9a744e6..cd3f2f1 100644 --- a/build/userscript.js +++ b/build/userscript.js @@ -30,14 +30,14 @@ var renderOut = function(outFile,ljs){ var time = (+new Date()); var ljs = `// @require https://cdn.jsdelivr.net/gh/jae-jae/l.js/userjs/l.userjs.min.js -// @require https://greasyfork.org/scripts/23420-userjs-base-js/code/userjs-basejs.js +// @require https://cdn.jsdelivr.net/gh/jae-jae/l.js@master/lib.js // @resource uiJs https://cdn.jsdelivr.net/gh/jae-jae/Userscript-Plus/dist/ui.js?_=${time}`; var ljs_GF = `// @require https://greasyfork.org/scripts/23419-l-js/code/ljs.js -// @require https://greasyfork.org/scripts/23420-userjs-base-js/code/userjs-basejs.js +// @require https://greasyfork.org/scripts/430303-l-lib2-js/code/l-lib2js.js // @resource uiJs https://cdn.jsdelivr.net/gh/jae-jae/Userscript-Plus/dist/ui.gf.js?_=${time}`; renderOut('./dist/show-site-all-userjs.user.js',ljs); //greasyfork version -renderOut('./dist/show-site-all-userjs.gf.user.js',ljs_GF); \ No newline at end of file +renderOut('./dist/show-site-all-userjs.gf.user.js',ljs_GF); diff --git a/dist/show-site-all-userjs.gf.user.js b/dist/show-site-all-userjs.gf.user.js index c99c7db..56a844c 100644 --- a/dist/show-site-all-userjs.gf.user.js +++ b/dist/show-site-all-userjs.gf.user.js @@ -7,7 +7,7 @@ // @name:ru-RU Userscript+ : Показать пользовательские скрипты (UserJS) для сайта. Jaeger // @name:ru Userscript+ : Показать пользовательские скрипты (UserJS) для сайта. Jaeger // @namespace https://github.com/jae-jae/Userscript-Plus -// @version 2.3.8 +// @version 2.4.0 // @description Show current site all UserJS,The easier way to install UserJs for Tampermonkey. // @description:zh 显示当前网站的所有可用UserJS(Tampermonkey)脚本,交流QQ群:104267383 // @description:zh-CN 显示当前网站的所有可用UserJS(Tampermonkey)脚本,交流QQ群:104267383 @@ -18,10 +18,10 @@ // @author Jaeger // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3ggEBCQHM3fXsAAAAVdJREFUOMudkz2qwkAUhc/goBaGJBgUtBCZyj0ILkpwAW7Bws4yO3AHLiCtEFD8KVREkoiFxZzX5A2KGfN4F04zMN+ce+5c4LMUgDmANYBnrnV+plBSi+FwyHq9TgA2LQpvCiEiABwMBtzv95RSfoNEHy8DYBzHrNVqVEr9BWKcqNFoxF6vx3a7zc1mYyC73a4MogBg7vs+z+czO50OW60Wt9stK5UKp9Mpj8cjq9WqDTBHnjAdxzGQZrPJw+HA31oulzbAWgLoA0CWZVBKIY5jzGYzdLtdE9DlcrFNrY98zobqOA6TJKHW2jg4nU5sNBpFDp6mhVe5rsvVasUwDHm9Xqm15u12o+/7Hy0gD8KatOd5vN/v1FozTVN6nkchxFuI6hsAAIMg4OPxMJCXdtTbR7JJCMEgCJhlGUlyPB4XfumozInrupxMJpRSRtZlKoNYl+m/6/wDuWAjtPfsQuwAAAAASUVORK5CYII= // @include * -// @require https://greasyfork.org/scripts/23419-l-js/code/ljs.js -// @require https://greasyfork.org/scripts/23420-userjs-base-js/code/userjs-basejs.js -// @resource uiJs https://cdn.jsdelivr.net/gh/jae-jae/Userscript-Plus/dist/ui.gf.js?_=1594928683653 -// @resource ui https://cdn.jsdelivr.net/gh/jae-jae/Userscript-Plus/dist/ui.html?_=1594928683654 +// @require https://greasyfork.org/scripts/23419-l-js/code/ljs.js +// @require https://greasyfork.org/scripts/430303-l-lib2-js/code/l-lib2js.js +// @resource uiJs https://cdn.jsdelivr.net/gh/jae-jae/Userscript-Plus/dist/ui.gf.js?_=1620545416123 +// @resource ui https://cdn.jsdelivr.net/gh/jae-jae/Userscript-Plus/dist/ui.html?_=1620545416124 // @resource count https://greasyfork.org/scripts/by-site.json // @grant GM_xmlhttpRequest // @grant GM_getResourceText @@ -42,125 +42,125 @@ unsafeWindow.GmAjax = GM_xmlhttpRequest; (function() { - 'use strict'; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var FetchUserjs = function () { - function FetchUserjs() { - _classCallCheck(this, FetchUserjs); - - this.host = this.getMainHost(); - this.showTime = 10; - this.quietKey = 'jae_fetch_userjs_quiet'; - this.countKey = 'jae_fetch_userjs_count'; - this.tplBox = '
'; - } - - _createClass(FetchUserjs, [{ - key: 'getMainHost', - value: function getMainHost() { - var host = window.location.hostname; - return psl.get(host) || host.split('.').splice(-2).join('.'); - } - }, { - key: 'getCountData', - value: function getCountData(host) { - var countData = GM_getResourceText('count'); - countData = JSON.parse(countData); - var count = countData[host]; - sessionStorage.setItem(this.countKey, count); - return count; - } - }, { - key: 'setSize', - value: function setSize(w, h) { - $('.jae-userscript').css({ - width: w, - height: h - }); - } - }, { - key: 'addEventListener', - value: function addEventListener(eventName, handler) { - document.getElementById('jae_userscript_box').addEventListener(eventName, handler); - } - }, { - key: 'bindEvent', - value: function bindEvent() { - var _this = this; - - this.timeId = setTimeout(function () { - $('#jae_userscript_box').remove(); - }, this.showTime * 1000); - - this.addEventListener('max', function () { - _this.setSize(860, 492); - $('.jae-userscript').addClass('jae-userscript-shadow'); - clearTimeout(_this.timeId); - }); - - this.addEventListener('min', function () { - setTimeout(function () { - $('.jae-userscript').removeClass('jae-userscript-shadow'); - _this.setSize(370, 56); - }, 500); - }); - - this.addEventListener('close', function () { - sessionStorage.setItem(_this.quietKey, 1); - $('#jae_userscript_box').remove(); - }); - - this.addEventListener('loading', function () { - clearTimeout(_this.timeId); - }); - } - }, { - key: 'execFrameJs', - value: function execFrameJs(frameWindow) { - var uiJs = GM_getResourceText('uiJs'); - return function (jsStr) { - frameWindow.eval(jsStr); - }.call(frameWindow, uiJs); - } - }, { - key: 'render', - value: function render() { - if (!this.isQuiet) { - var count = this.getCountData(this.host); - if (count) { - $('body').append(this.tplBox); - - var ui = GM_getResourceText('ui'); - var dom = document.getElementsByClassName('jae-userscript')[0]; - var tpl = ''; - dom.innerHTML = tpl; - var iframeDom = dom.children[0]; - iframe.write(iframeDom, ui); - - this.execFrameJs(jaeFetchUserJSFrame.window); - - this.bindEvent(); - } - } - } - }, { - key: 'isQuiet', - get: function get() { - var quiet = sessionStorage.getItem(this.quietKey); - return quiet ? true : false; - } - }]); - - return FetchUserjs; -}(); - -ljs.exec(['jQuery', 'iframe', 'psl'], function () { - var fu = new FetchUserjs(); - fu.render(); + 'use strict'; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var FetchUserjs = function () { + function FetchUserjs() { + _classCallCheck(this, FetchUserjs); + + this.host = this.getMainHost(); + this.showTime = 10; + this.quietKey = 'jae_fetch_userjs_quiet'; + this.countKey = 'jae_fetch_userjs_count'; + this.tplBox = '
'; + } + + _createClass(FetchUserjs, [{ + key: 'getMainHost', + value: function getMainHost() { + var host = window.location.hostname; + return psl.get(host) || host.split('.').splice(-2).join('.'); + } + }, { + key: 'getCountData', + value: function getCountData(host) { + var countData = GM_getResourceText('count'); + countData = JSON.parse(countData); + var count = countData[host]; + sessionStorage.setItem(this.countKey, count); + return count; + } + }, { + key: 'setSize', + value: function setSize(w, h) { + $('.jae-userscript').css({ + width: w, + height: h + }); + } + }, { + key: 'addEventListener', + value: function addEventListener(eventName, handler) { + document.getElementById('jae_userscript_box').addEventListener(eventName, handler); + } + }, { + key: 'bindEvent', + value: function bindEvent() { + var _this = this; + + this.timeId = setTimeout(function () { + $('#jae_userscript_box').remove(); + }, this.showTime * 1000); + + this.addEventListener('max', function () { + _this.setSize(860, 492); + $('.jae-userscript').addClass('jae-userscript-shadow'); + clearTimeout(_this.timeId); + }); + + this.addEventListener('min', function () { + setTimeout(function () { + $('.jae-userscript').removeClass('jae-userscript-shadow'); + _this.setSize(370, 56); + }, 500); + }); + + this.addEventListener('close', function () { + sessionStorage.setItem(_this.quietKey, 1); + $('#jae_userscript_box').remove(); + }); + + this.addEventListener('loading', function () { + clearTimeout(_this.timeId); + }); + } + }, { + key: 'execFrameJs', + value: function execFrameJs(frameWindow) { + var uiJs = GM_getResourceText('uiJs'); + return function (jsStr) { + frameWindow.eval(jsStr); + }.call(frameWindow, uiJs); + } + }, { + key: 'render', + value: function render() { + if (!this.isQuiet) { + var count = this.getCountData(this.host); + if (count) { + $('body').append(this.tplBox); + + var ui = GM_getResourceText('ui'); + var dom = document.getElementsByClassName('jae-userscript')[0]; + var tpl = ''; + dom.innerHTML = tpl; + var iframeDom = dom.children[0]; + iframe.write(iframeDom, ui); + + this.execFrameJs(jaeFetchUserJSFrame.window); + + this.bindEvent(); + } + } + } + }, { + key: 'isQuiet', + get: function get() { + var quiet = sessionStorage.getItem(this.quietKey); + return quiet ? true : false; + } + }]); + + return FetchUserjs; +}(); + +ljs.exec(['jQuery', 'iframe', 'psl'], function () { + var fu = new FetchUserjs(); + fu.render(); }); -})(); \ No newline at end of file +})(); diff --git a/dist/show-site-all-userjs.user.js b/dist/show-site-all-userjs.user.js index 1092636..499e743 100644 --- a/dist/show-site-all-userjs.user.js +++ b/dist/show-site-all-userjs.user.js @@ -7,7 +7,7 @@ // @name:ru-RU Userscript+ : Показать пользовательские скрипты (UserJS) для сайта. Jaeger // @name:ru Userscript+ : Показать пользовательские скрипты (UserJS) для сайта. Jaeger // @namespace https://github.com/jae-jae/Userscript-Plus -// @version 2.3.8 +// @version 2.4.0 // @description Show current site all UserJS,The easier way to install UserJs for Tampermonkey. // @description:zh 显示当前网站的所有可用UserJS(Tampermonkey)脚本,交流QQ群:104267383 // @description:zh-CN 显示当前网站的所有可用UserJS(Tampermonkey)脚本,交流QQ群:104267383 @@ -18,10 +18,10 @@ // @author Jaeger // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3ggEBCQHM3fXsAAAAVdJREFUOMudkz2qwkAUhc/goBaGJBgUtBCZyj0ILkpwAW7Bws4yO3AHLiCtEFD8KVREkoiFxZzX5A2KGfN4F04zMN+ce+5c4LMUgDmANYBnrnV+plBSi+FwyHq9TgA2LQpvCiEiABwMBtzv95RSfoNEHy8DYBzHrNVqVEr9BWKcqNFoxF6vx3a7zc1mYyC73a4MogBg7vs+z+czO50OW60Wt9stK5UKp9Mpj8cjq9WqDTBHnjAdxzGQZrPJw+HA31oulzbAWgLoA0CWZVBKIY5jzGYzdLtdE9DlcrFNrY98zobqOA6TJKHW2jg4nU5sNBpFDp6mhVe5rsvVasUwDHm9Xqm15u12o+/7Hy0gD8KatOd5vN/v1FozTVN6nkchxFuI6hsAAIMg4OPxMJCXdtTbR7JJCMEgCJhlGUlyPB4XfumozInrupxMJpRSRtZlKoNYl+m/6/wDuWAjtPfsQuwAAAAASUVORK5CYII= // @include * -// @require https://cdn.jsdelivr.net/gh/jae-jae/l.js/userjs/l.userjs.min.js -// @require https://greasyfork.org/scripts/23420-userjs-base-js/code/userjs-basejs.js -// @resource uiJs https://cdn.jsdelivr.net/gh/jae-jae/Userscript-Plus/dist/ui.js?_=1594928683653 -// @resource ui https://cdn.jsdelivr.net/gh/jae-jae/Userscript-Plus/dist/ui.html?_=1594928683653 +// @require https://cdn.jsdelivr.net/gh/jae-jae/l.js/userjs/l.userjs.min.js +// @require https://cdn.jsdelivr.net/gh/jae-jae/l.js@master/lib.js +// @resource uiJs https://cdn.jsdelivr.net/gh/jae-jae/Userscript-Plus/dist/ui.js?_=1620545416123 +// @resource ui https://cdn.jsdelivr.net/gh/jae-jae/Userscript-Plus/dist/ui.html?_=1620545416123 // @resource count https://greasyfork.org/scripts/by-site.json // @grant GM_xmlhttpRequest // @grant GM_getResourceText @@ -42,125 +42,125 @@ unsafeWindow.GmAjax = GM_xmlhttpRequest; (function() { - 'use strict'; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var FetchUserjs = function () { - function FetchUserjs() { - _classCallCheck(this, FetchUserjs); - - this.host = this.getMainHost(); - this.showTime = 10; - this.quietKey = 'jae_fetch_userjs_quiet'; - this.countKey = 'jae_fetch_userjs_count'; - this.tplBox = '
'; - } - - _createClass(FetchUserjs, [{ - key: 'getMainHost', - value: function getMainHost() { - var host = window.location.hostname; - return psl.get(host) || host.split('.').splice(-2).join('.'); - } - }, { - key: 'getCountData', - value: function getCountData(host) { - var countData = GM_getResourceText('count'); - countData = JSON.parse(countData); - var count = countData[host]; - sessionStorage.setItem(this.countKey, count); - return count; - } - }, { - key: 'setSize', - value: function setSize(w, h) { - $('.jae-userscript').css({ - width: w, - height: h - }); - } - }, { - key: 'addEventListener', - value: function addEventListener(eventName, handler) { - document.getElementById('jae_userscript_box').addEventListener(eventName, handler); - } - }, { - key: 'bindEvent', - value: function bindEvent() { - var _this = this; - - this.timeId = setTimeout(function () { - $('#jae_userscript_box').remove(); - }, this.showTime * 1000); - - this.addEventListener('max', function () { - _this.setSize(860, 492); - $('.jae-userscript').addClass('jae-userscript-shadow'); - clearTimeout(_this.timeId); - }); - - this.addEventListener('min', function () { - setTimeout(function () { - $('.jae-userscript').removeClass('jae-userscript-shadow'); - _this.setSize(370, 56); - }, 500); - }); - - this.addEventListener('close', function () { - sessionStorage.setItem(_this.quietKey, 1); - $('#jae_userscript_box').remove(); - }); - - this.addEventListener('loading', function () { - clearTimeout(_this.timeId); - }); - } - }, { - key: 'execFrameJs', - value: function execFrameJs(frameWindow) { - var uiJs = GM_getResourceText('uiJs'); - return function (jsStr) { - frameWindow.eval(jsStr); - }.call(frameWindow, uiJs); - } - }, { - key: 'render', - value: function render() { - if (!this.isQuiet) { - var count = this.getCountData(this.host); - if (count) { - $('body').append(this.tplBox); - - var ui = GM_getResourceText('ui'); - var dom = document.getElementsByClassName('jae-userscript')[0]; - var tpl = ''; - dom.innerHTML = tpl; - var iframeDom = dom.children[0]; - iframe.write(iframeDom, ui); - - this.execFrameJs(jaeFetchUserJSFrame.window); - - this.bindEvent(); - } - } - } - }, { - key: 'isQuiet', - get: function get() { - var quiet = sessionStorage.getItem(this.quietKey); - return quiet ? true : false; - } - }]); - - return FetchUserjs; -}(); - -ljs.exec(['jQuery', 'iframe', 'psl'], function () { - var fu = new FetchUserjs(); - fu.render(); + 'use strict'; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var FetchUserjs = function () { + function FetchUserjs() { + _classCallCheck(this, FetchUserjs); + + this.host = this.getMainHost(); + this.showTime = 10; + this.quietKey = 'jae_fetch_userjs_quiet'; + this.countKey = 'jae_fetch_userjs_count'; + this.tplBox = '
'; + } + + _createClass(FetchUserjs, [{ + key: 'getMainHost', + value: function getMainHost() { + var host = window.location.hostname; + return psl.get(host) || host.split('.').splice(-2).join('.'); + } + }, { + key: 'getCountData', + value: function getCountData(host) { + var countData = GM_getResourceText('count'); + countData = JSON.parse(countData); + var count = countData[host]; + sessionStorage.setItem(this.countKey, count); + return count; + } + }, { + key: 'setSize', + value: function setSize(w, h) { + $('.jae-userscript').css({ + width: w, + height: h + }); + } + }, { + key: 'addEventListener', + value: function addEventListener(eventName, handler) { + document.getElementById('jae_userscript_box').addEventListener(eventName, handler); + } + }, { + key: 'bindEvent', + value: function bindEvent() { + var _this = this; + + this.timeId = setTimeout(function () { + $('#jae_userscript_box').remove(); + }, this.showTime * 1000); + + this.addEventListener('max', function () { + _this.setSize(860, 492); + $('.jae-userscript').addClass('jae-userscript-shadow'); + clearTimeout(_this.timeId); + }); + + this.addEventListener('min', function () { + setTimeout(function () { + $('.jae-userscript').removeClass('jae-userscript-shadow'); + _this.setSize(370, 56); + }, 500); + }); + + this.addEventListener('close', function () { + sessionStorage.setItem(_this.quietKey, 1); + $('#jae_userscript_box').remove(); + }); + + this.addEventListener('loading', function () { + clearTimeout(_this.timeId); + }); + } + }, { + key: 'execFrameJs', + value: function execFrameJs(frameWindow) { + var uiJs = GM_getResourceText('uiJs'); + return function (jsStr) { + frameWindow.eval(jsStr); + }.call(frameWindow, uiJs); + } + }, { + key: 'render', + value: function render() { + if (!this.isQuiet) { + var count = this.getCountData(this.host); + if (count) { + $('body').append(this.tplBox); + + var ui = GM_getResourceText('ui'); + var dom = document.getElementsByClassName('jae-userscript')[0]; + var tpl = ''; + dom.innerHTML = tpl; + var iframeDom = dom.children[0]; + iframe.write(iframeDom, ui); + + this.execFrameJs(jaeFetchUserJSFrame.window); + + this.bindEvent(); + } + } + } + }, { + key: 'isQuiet', + get: function get() { + var quiet = sessionStorage.getItem(this.quietKey); + return quiet ? true : false; + } + }]); + + return FetchUserjs; +}(); + +ljs.exec(['jQuery', 'iframe', 'psl'], function () { + var fu = new FetchUserjs(); + fu.render(); }); -})(); \ No newline at end of file +})(); diff --git a/userscript/tpl.js b/userscript/tpl.js index 57b0dc0..67578e8 100644 --- a/userscript/tpl.js +++ b/userscript/tpl.js @@ -7,7 +7,7 @@ // @name:ru-RU Userscript+ : Показать пользовательские скрипты (UserJS) для сайта. Jaeger // @name:ru Userscript+ : Показать пользовательские скрипты (UserJS) для сайта. Jaeger // @namespace https://github.com/jae-jae/Userscript-Plus -// @version 2.3.8 +// @version 2.4.0 // @description Show current site all UserJS,The easier way to install UserJs for Tampermonkey. // @description:zh 显示当前网站的所有可用UserJS(Tampermonkey)脚本,交流QQ群:104267383 // @description:zh-CN 显示当前网站的所有可用UserJS(Tampermonkey)脚本,交流QQ群:104267383 @@ -42,4 +42,4 @@ unsafeWindow.GmAjax = GM_xmlhttpRequest; {code} -})(); \ No newline at end of file +})();