(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.main = {})); }(this, (function (exports) { 'use strict'; function ___$insertStyle(css) { if (!css) { return; } if (typeof window === 'undefined') { return; } var style = document.createElement('style'); style.setAttribute('type', 'text/css'); style.innerHTML = css; document.head.appendChild(style); return css; } var main = "
\r\n
\r\n 提示X\r\n
\r\n
\r\n 抱歉,您所使用的浏览器无法完成此操作。 加入收藏失败,请使用Ctrl+D进行添加\r\n
\r\n
\r\n 确定\r\n
\r\n
\r\n"; ___$insertStyle("* {\n margin: 0;\n padding: 0;\n}\n\n.gudie-button {\n cursor: pointer;\n}\n\n.clearfix:after {\n visibility: hidden;\n display: block;\n font-size: 0;\n content: \" \";\n clear: both;\n height: 0;\n}\n\n#plugin-popup {\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n position: fixed;\n display: none;\n z-index: 2;\n top: 0;\n left: 0;\n}\n#plugin-popup .popup-content {\n margin: 20% auto;\n width: 310px;\n height: 200px;\n background-color: white;\n border-radius: 20px;\n line-height: 30px;\n}\n#plugin-popup .popup-content .head {\n padding: 15px;\n border-bottom: 1px solid #999;\n}\n#plugin-popup .popup-content .head .head-item-1 {\n float: left;\n font-size: 16px;\n}\n#plugin-popup .popup-content .head .head-item-2 {\n float: right;\n font-size: 16px;\n cursor: pointer;\n}\n#plugin-popup .popup-content .content {\n font-size: 14px;\n color: #333;\n padding: 5% 20px;\n}\n#plugin-popup .popup-content .bottom {\n background-color: #c76315;\n color: white;\n width: 50px;\n height: 30px;\n font-size: 16px;\n text-align: center;\n line-height: 30px;\n float: right;\n cursor: pointer;\n margin-right: 20px;\n}"); function initMain() { var div = document.createElement("div"); div.innerHTML = _.template(main)({ ABC: "AAAA" }); div.id = "plugin-popup"; document.body.appendChild(div); var target = document.querySelector("#plugin-popup"); var bottom = document.querySelector(".bottom"); var button = document.querySelector(".head-item-2"); var collectButton = document.querySelector(".gudie-button"); bottom.addEventListener("click", function () { target.style.display = "none"; }); button.addEventListener("click", function () { target.style.display = "none"; }); collectButton.addEventListener("click", function () { target.style.display = "block"; }); } initMain(); exports.initMain = initMain; Object.defineProperty(exports, '__esModule', { value: true }); })));