@jswork/alo7-develop-assistant
Advanced tools
Comparing version 1.0.82 to 1.0.83
@@ -5,7 +5,7 @@ /** | ||
* homepage: https://github.com/afeiship | ||
* version: 1.0.82 | ||
* date: 2022-07-27T00:56:15.727Z | ||
* version: 1.0.83 | ||
* date: 2022-07-27T05:33:48.431Z | ||
* license: MIT | ||
*/ | ||
!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){$(document).ready(()=>{if(!document.URL.includes("cloud.beta.aigene.org.cn"))return!1;var t=nx.declare({properties:{devUrl:{set:function(t){localStorage.setItem("gm.dev_url",t)},get:function(){return localStorage.getItem("gm.dev_url")||""}},ifm:function(){return document.querySelector("iframe.bio-iframe")}},methods:{start(){this.iniEvents(),this.initElements(),this.syncIframe()},iniEvents(){var t=this;$("body").on("submit",'[data-action="submit"]',(function(e){e.preventDefault(),t.inject()})),$("body").on("dblclick",'[data-action="input"]',(function(t){this.select()})),$("body").on("click",'[data-action="get-iframe"]',(function(e){gmsdk.setClipboard(t.ifm.src),$.toast({icon:"success",heading:"已为你复制到剪贴板",position:"top-right",stack:!1,hideAfter:1e3})})),$("body").on("click",'[data-action="token"]',(function(t){gmsdk.setClipboard(localStorage.getItem("COMMON_SSO_TOKEN")),$.toast({icon:"success",heading:"已为你复制到剪贴板",position:"top-right",stack:!1,hideAfter:1e3})})),$("body").on("input",'[data-action="input"]',(function(e){t.devUrl=e.target.value})),$("body").on("click",'[data-action="reset"]',(function(t){localStorage.removeItem("gm.dev_url"),window.location.reload()}))},initElements(){$('[class^="Header___StyledHeader"]').prepend(`\n <form class="gm-row gm-row-center ml-10_ ml_" data-action="submit">\n <span class="gm-tag gm-tag-positive">v 1.0.82</span>\n <input type="search" data-action="input" value="${this.devUrl}" class="gm-form-control" placeholder="请输入你的开发URL地址">\n <button class="gm-btn gm-btn-primary is-large" data-action="inject">注入URL</button>\n <button type="button" class="gm-btn gm-btn-default is-large" data-action="reset">重置</button>\n <button type="button" class="gm-btn gm-btn-default is-large" data-action="get-iframe">获取iframe地址</button>\n <button type="button" class="gm-btn gm-btn-warning is-large" data-action="token">获取TOKEN</button>\n </form>\n `)},syncIframe(){this.devUrl&&(this.ifm.src=this.devUrl)},inject(){const t=document.querySelector('[data-action="input"]');this.devUrl=t.value,this.syncIframe(),window.location.reload()}}});nx.waitToDisplay("iframe",1e3,()=>{(new t).start()})})})); | ||
!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){$(document).ready(()=>{if(!document.URL.includes("cloud.beta.aigene.org.cn"))return!1;var t=nx.declare({properties:{devUrl:{set:function(t){localStorage.setItem("gm.dev_url",t)},get:function(){return localStorage.getItem("gm.dev_url")||""}},ifm:function(){return document.querySelector("iframe.bio-iframe")}},methods:{start(){this.iniEvents(),this.initElements(),this.syncIframe()},iniEvents(){var t=this;$("body").on("submit",'[data-action="submit"]',(function(n){n.preventDefault(),t.inject()})),$("body").on("dblclick",'[data-action="input"]',(function(t){this.select()})),$("body").on("click",'[data-action="get-iframe"]',(function(n){gmsdk.setClipboard(t.ifm.src),$.toast({icon:"success",heading:"已为你复制到剪贴板",position:"top-right",stack:!1,hideAfter:1e3})})),$("body").on("click",'[data-action="token"]',(function(t){gmsdk.setClipboard(localStorage.getItem("COMMON_SSO_TOKEN")),$.toast({icon:"success",heading:"已为你复制到剪贴板",position:"top-right",stack:!1,hideAfter:1e3})})),$("body").on("input",'[data-action="input"]',(function(n){t.devUrl=n.target.value})),$("body").on("click",'[data-action="reset"]',(function(t){localStorage.removeItem("gm.dev_url"),window.location.reload()}))},initElements(){$('[class^="MainFrame___Styled"]').eq(1).prepend(`\n <form class="gm-row gm-row-center m-10 ml-10_ ml_" data-action="submit" style="width: auto;">\n <span class="gm-tag gm-tag-positive">v 1.0.83</span>\n <input type="search" data-action="input" value="${this.devUrl}" class="gm-form-control" placeholder="请输入你的开发URL地址">\n <button class="gm-btn gm-btn-primary is-large" data-action="inject">注入URL</button>\n <button type="button" class="gm-btn gm-btn-default is-large" data-action="reset">重置</button>\n <button type="button" class="gm-btn gm-btn-default is-large" data-action="get-iframe">获取iframe地址</button>\n <button type="button" class="gm-btn gm-btn-warning is-large" data-action="token">获取TOKEN</button>\n </form>\n `)},syncIframe(){this.devUrl&&(this.ifm.src=this.devUrl)},inject(){const t=document.querySelector('[data-action="input"]');this.devUrl=t.value,this.syncIframe(),window.location.reload()}}});nx.waitToDisplay("iframe",1e3,()=>{(new t).start()})})})); |
// ==UserScript== | ||
// @name alo7-develop-assistant | ||
// @namespace https://github.com/afeiship/alo7-develop-assistant | ||
// @version 1.0.82 | ||
// @version 1.0.83 | ||
// @description Develop assistant for alo7. | ||
@@ -18,3 +18,3 @@ // @author aric.zheng | ||
// @require https://unpkg.com/@jswork/gm-sdk@1.0.21 | ||
// @require https://cdn.jsdelivr.net/npm/@jswork/alo7-develop-assistant@1.0.82 | ||
// @require https://cdn.jsdelivr.net/npm/@jswork/alo7-develop-assistant@1.0.83 | ||
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery-toast-plugin/1.3.2/jquery.toast.min.js | ||
@@ -21,0 +21,0 @@ // @require https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.js |
{ | ||
"name": "@jswork/alo7-develop-assistant", | ||
"version": "1.0.82", | ||
"version": "1.0.83", | ||
"description": "Develop assistant for alo7.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/afeiship", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6740