@jswork/alo7-develop-assistant
Advanced tools
Comparing version 1.0.76 to 1.0.77
@@ -5,7 +5,7 @@ /** | ||
* homepage: https://github.com/afeiship | ||
* version: 1.0.76 | ||
* date: 2022-06-27T10:42:55.362Z | ||
* version: 1.0.77 | ||
* date: 2022-06-27T14:17:12.255Z | ||
* license: MIT | ||
*/ | ||
!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){$(document).ready(()=>{if(!document.URL.includes("bio-platform-frontend.beta"))return!1;var t=nx.declare({properties:{devUrl:{set:function(t){localStorage.setItem("__dev_url__",t)},get:function(){return localStorage.getItem("__dev_url__")}}},methods:{start(){this.iniEvents(),this.initElements(),this.syncIframe()},iniEvents(){var t=this;$("body").on("submit",'[data-action="form"]',(function(e){e.preventDefault(),t.inject()})),$("body").on("input",'[data-action="input"]',(function(e){t.devUrl=e.target.value})),$("body").on("click",'[data-action="reset"]',(function(t){console.log("click reset.",t),localStorage.removeItem("__dev_url__"),window.location.reload()}))},initElements(){$('[class^="Header___StyledHeader"]').prepend(`\n <form class="gm-row gm-row-center" data-role="form">\n <input type="text" data-action="input" value="${this.devUrl}" class="gm-form-control" placeholder="请输入你的开发URL地址">\n <button style="margin-left: 10px" class="gm-btn gm-btn-primary is-large" data-action="inject">注入URL</button>\n <button type="button" style="margin-left: 10px" class="gm-btn gm-btn-default is-large" data-action="reset">重置</button>\n </form>\n `)},syncIframe(){this.devUrl&&(document.querySelector("iframe").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("bio-platform-frontend.beta"))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")}},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){GM_setClipboard(t.ifm.src),$.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" data-action="submit">\n <span class="gm-tag gm-tag-positive" style="margin-right: 10px;">v 1.0.77</span>\n <input type="search" data-action="input" value="${this.devUrl}" class="gm-form-control" placeholder="请输入你的开发URL地址">\n <button style="margin-left: 10px" class="gm-btn gm-btn-primary is-large" data-action="inject">注入URL</button>\n <button type="button" style="margin-left: 10px" class="gm-btn gm-btn-default is-large" data-action="reset">重置</button>\n <button type="button" style="margin-left: 10px" class="gm-btn gm-btn-default is-large" data-action="get-iframe">获取iframe地址</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.76 | ||
// @version 1.0.77 | ||
// @description Develop assistant for alo7. | ||
@@ -17,3 +17,3 @@ // @author aric.zheng | ||
// @require https://cdn.jsdelivr.net/npm/@jswork/gm-sdk@1.0.18 | ||
// @require https://cdn.jsdelivr.net/npm/@jswork/alo7-develop-assistant@1.0.76 | ||
// @require https://cdn.jsdelivr.net/npm/@jswork/alo7-develop-assistant@1.0.77 | ||
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery-toast-plugin/1.3.2/jquery.toast.min.js | ||
@@ -20,0 +20,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.76", | ||
"version": "1.0.77", | ||
"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
6438
71