7 Star 32 Fork 13

imba久期 / js

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
js-42.min.js 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
imba久期 提交于 2023-10-22 18:43 . fix: github 改版适配
if(document.querySelector(".koe_42_a")===null){var koe_is_github=/github/.test(window.location.href);var koe_42_code=koe_is_github?document.querySelector("#read-only-cursor-text-area").value:document.querySelector(".highlight .line").innerText.replace(/[\r\n]$/,"");var koe_42_style=document.createElement("style");koe_42_style.innerText=".koe_42_a { position:absolute;top:7px;left:200px;width:100px;height:30px;line-height:30px;text-align:center;background-color:#24aee6;cursor:move;font-size:0;border-radius:5px;text-decoration:none !important;z-index:999999; } .koe_42_a::before { content:'拖到收藏夹';font-size:16px;color:#FFF; }";document.head.appendChild(koe_42_style);var koe_42_a=document.createElement("a");koe_42_a.setAttribute("class","koe_42_a");var koe_42_data=JSON.parse(/\/\*(\{.*\})\*\//.exec(koe_42_code)[1]);koe_42_a.innerText=koe_42_data.name;koe_42_a.href="javascript:"+koe_42_code;if(koe_is_github){koe_42_a.setAttribute("style","position: unset;");document.querySelector('[data-testid="latest-commit"]').appendChild(koe_42_a)}else{document.querySelector(".file_holder").appendChild(koe_42_a)}}/*{"name":"生成拖拽安装"}*/
JavaScript
1
https://gitee.com/imba97/js.git
git@gitee.com:imba97/js.git
imba97
js
js
master

搜索帮助