wmod-proxy
Version:
Website Modification Proxy
12 lines (10 loc) • 1.18 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getIndicatorScript = getIndicatorScript;
var indicatorStyle = "\n a#wm-indicator {\n display: block;\n position: fixed;\n top: 0;\n left: 2%;\n background: rgba(255, 255, 255, 0.2);\n color: #C4FA58;\n border-radius: 0 0 4px 4px;\n padding: 4px;\n font-family: sans-serif;\n font-weight: bold;\n font-size: 75%;\n text-decoration: none;\n opacity: 0.6;\n }\n a#wm-indicator:hover {\n opacity: 1;\n }\n";
function getIndicatorScript(manifest) {
return "\n document.addEventListener('DOMContentLoaded', function () {\n const a = document.createElement('a');\n a.href = '".concat(manifest.homepage, "';\n a.textContent = 'WM';\n a.title = `").concat(manifest.name, " ").concat(manifest.version, "\n").concat(manifest.description, "`;\n a.setAttribute('id', 'wm-indicator');\n document.body.appendChild(a);\n const style = document.createElement('style');\n style.textContent = `").concat(indicatorStyle, "`;\n document.head.appendChild(style);\n })\n ");
}
//# sourceMappingURL=indicator.js.map