@jswork/alo7-develop-assistant
Advanced tools
Comparing version 1.0.83 to 1.0.84
@@ -5,7 +5,7 @@ /** | ||
* homepage: https://github.com/afeiship | ||
* version: 1.0.83 | ||
* date: 2022-07-27T05:33:48.431Z | ||
* version: 1.0.84 | ||
* date: 2023-05-30T06:30:44.034Z | ||
* 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(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()})})})); | ||
!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){$(document).ready(()=>{location.href.includes("swagger-ui")&&(gmsdk.addStyle("\n #resources .circle-index{\n padding: 5px;\n background: #547e03;\n color: #fff;\n border-radius: 50px;\n }\n #resources .resource .heading > h2{\n font-size: 14px;\n }\n .operations li .heading .options li{\n display: flex;\n align-items: center;\n }\n .operations li .heading .options li a{\n margin-left: 10px;\n width: 120px;\n overflow: hidden;\n text-overflow: ellipsis;\n display: block;\n }\n "),nx.waitToDisplay("#resources .resource .heading > h2",1e3,(function(){$("#resources .resource .heading > h2").each((e,n)=>{var i="0"+(e+1);$(n).prepend(`<i class="circle-index">${i.slice(-2)}</i>`),$(n).append('<button class="clipboard items">Copy</button>')}),$(".operations li .heading .options li").prepend('<button class="clipboard item">Copy</button>'),$(".clipboard.item").click(e=>{var n=$(e.target).parents(".heading").find(".path").text().trim(),i=$(e.target).parents(".heading").find(".http_method a").text().trim();gmsdk.setClipboard(`['${i.toLowerCase()}', '${n}']`)}),$(".clipboard.items").click(e=>{var n=$(e.target).parents(".heading").next(".endpoints").find(".operation > div.heading > h3 > span.path").text().split("\n").map(e=>e.trim()).filter(Boolean);gmsdk.setClipboard(JSON.stringify(n,null,2))})})))})})); |
// ==UserScript== | ||
// @name alo7-develop-assistant | ||
// @namespace https://github.com/afeiship/alo7-develop-assistant | ||
// @version 1.0.83 | ||
// @version 1.0.84 | ||
// @description Develop assistant for alo7. | ||
// @author aric.zheng | ||
// @include *://*.saybot.net:*/* | ||
// @include *://*.saybot.net/* | ||
// @include *://*.aigene.org.cn/* | ||
// @include *://*.saybot.com/* | ||
// @include *://*.shuobaotang.com/* | ||
// @include *://*.alo7.com/* | ||
// @include *://*.alo7.cn/* | ||
// @match *://*.saybot.net:*/* | ||
// @match *://*.saybot.net/* | ||
// @match *://*.aigene.org.cn/* | ||
// @match *://*.saybot.com/* | ||
// @match *://*.shuobaotang.com/* | ||
// @match *://*.alo7.com/* | ||
// @match *://*.alo7.cn/* | ||
// @updateURL https://raw.githubusercontent.com/afeiship/alo7-develop-assistant/master/dist/install.js | ||
// @supportURL https://github.com/afeiship/alo7-develop-assistant/issues/new?assignees=adlered&labels=help+wanted&template=ISSUE_TEMPLATE.md&title= | ||
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js | ||
// @require https://unpkg.com/@jswork/gm-sdk@1.0.21 | ||
// @require https://cdn.jsdelivr.net/npm/@jswork/alo7-develop-assistant@1.0.83 | ||
// @require https://unpkg.com/@jswork/gm-sdk@1.0.26 | ||
// @require https://cdn.jsdelivr.net/npm/@jswork/alo7-develop-assistant@1.0.84 | ||
// @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.83", | ||
"version": "1.0.84", | ||
"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
5791
70