博客整治

帮助你获得一致的博客阅读体验

נכון ליום 18-01-2022. ראה הגרסה האחרונה.

  1. // ==UserScript==
  2. // @name 博客整治
  3. // @version 0.0.6
  4. // @description 帮助你获得一致的博客阅读体验
  5. // @author gausszhou@qq.com
  6. // @namespace gausszhou
  7. // @grant none
  8. // @run-at document-start
  9. // @icon https://www.gausszhou.top/favicon.ico
  10. // @license MIT
  11. // @require https://cdn.bootcdn.net/ajax/libs/jquery/0.0.6/jquery.min.js
  12. // @include *://*.csdn.net/*
  13. // @include *://csdn.net/*
  14. // @include *://*.cnblogs.com/*
  15. // @include *://cnblogs.com/*
  16. // @include *://*.juejin.cn/*
  17. // @include *://juejin.cn/*
  18. // @supportURL https://github.com/gausszhou/user-scripts
  19. // @homepageURL https://github.com/gausszhou/user-scripts
  20. // ==/UserScript==
  21.  
  22. /******/ (() => { // webpackBootstrap
  23. /******/ "use strict";
  24. /******/ var __webpack_modules__ = ({
  25.  
  26. /***/ 265:
  27. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  28.  
  29. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  30. /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
  31. /* harmony export */ });
  32. /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(601);
  33. /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
  34. /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(609);
  35. /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
  36. // Imports
  37.  
  38.  
  39. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
  40. // Module
  41. ___CSS_LOADER_EXPORT___.push([module.id, "body{display:none}.csdn #csdn-toolbar,.csdn .blog-footer-bottom{display:none !important}.csdn .user-profile-head .user-profile-head-banner{height:2rem !important}.csdn.menu .csdn-side-toolbar,.csdn.menu .user-spm-list,.csdn.menu .user-influence-list,.csdn.menu .user-achievement,.csdn.menu #asideProfile,.csdn.menu #asideNewComments{display:none !important}.csdn.article #asideProfile,.csdn.article #asideCategory,.csdn.article #asideNewComments,.csdn.article #asideNewNps,.csdn.article #asideArchive,.csdn.article #asideHotArticle,.csdn.article #asideSearchArticle,.csdn.article #asideCustom,.csdn.article #asidedirectory,.csdn.article #btnMoreComment,.csdn.article .recommend-box,.csdn.article .recommend-right_aside .toolbar-advert{display:none !important}.csdn.article .main_father{max-width:800px;margin:0 auto}.csdn.article .blog-content-box{margin-top:1em}.csdn.article .template-box{margin-bottom:1em}.csdn.article blockquote{margin:0.5em !important;padding:1em !important;border-left:5px solid #005282 !important;background-color:#f4f4f4 !important;color:#1b1b1b !important}.cnblog{min-width:768px}.cnblog #rss{display:none !important}.cnblog #container{min-width:0 !important}.cnblog #lnkBlogTitle,.cnblog #cb_post_title_url{font-size:32px}.cnblog #content{margin:0 auto !important;max-width:740px}.cnblog #sidebar{display:none !important}.juejin .sidebar-bd-entry,.juejin .app-download-sidebar-block .recommend-box,.juejin .recommended-area{display:none !important}\n", ""]);
  42. // Exports
  43. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  44.  
  45.  
  46. /***/ }),
  47.  
  48. /***/ 609:
  49. /***/ ((module) => {
  50.  
  51.  
  52.  
  53. /*
  54. MIT License http://www.opensource.org/licenses/mit-license.php
  55. Author Tobias Koppers @sokra
  56. */
  57. module.exports = function (cssWithMappingToString) {
  58. var list = []; // return the list of modules as css string
  59.  
  60. list.toString = function toString() {
  61. return this.map(function (item) {
  62. var content = "";
  63. var needLayer = typeof item[5] !== "undefined";
  64.  
  65. if (item[4]) {
  66. content += "@supports (".concat(item[4], ") {");
  67. }
  68.  
  69. if (item[2]) {
  70. content += "@media ".concat(item[2], " {");
  71. }
  72.  
  73. if (needLayer) {
  74. content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
  75. }
  76.  
  77. content += cssWithMappingToString(item);
  78.  
  79. if (needLayer) {
  80. content += "}";
  81. }
  82.  
  83. if (item[2]) {
  84. content += "}";
  85. }
  86.  
  87. if (item[4]) {
  88. content += "}";
  89. }
  90.  
  91. return content;
  92. }).join("");
  93. }; // import a list of modules into the list
  94.  
  95.  
  96. list.i = function i(modules, media, dedupe, supports, layer) {
  97. if (typeof modules === "string") {
  98. modules = [[null, modules, undefined]];
  99. }
  100.  
  101. var alreadyImportedModules = {};
  102.  
  103. if (dedupe) {
  104. for (var k = 0; k < this.length; k++) {
  105. var id = this[k][0];
  106.  
  107. if (id != null) {
  108. alreadyImportedModules[id] = true;
  109. }
  110. }
  111. }
  112.  
  113. for (var _k = 0; _k < modules.length; _k++) {
  114. var item = [].concat(modules[_k]);
  115.  
  116. if (dedupe && alreadyImportedModules[item[0]]) {
  117. continue;
  118. }
  119.  
  120. if (typeof layer !== "undefined") {
  121. if (typeof item[5] === "undefined") {
  122. item[5] = layer;
  123. } else {
  124. item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
  125. item[5] = layer;
  126. }
  127. }
  128.  
  129. if (media) {
  130. if (!item[2]) {
  131. item[2] = media;
  132. } else {
  133. item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
  134. item[2] = media;
  135. }
  136. }
  137.  
  138. if (supports) {
  139. if (!item[4]) {
  140. item[4] = "".concat(supports);
  141. } else {
  142. item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
  143. item[4] = supports;
  144. }
  145. }
  146.  
  147. list.push(item);
  148. }
  149. };
  150.  
  151. return list;
  152. };
  153.  
  154. /***/ }),
  155.  
  156. /***/ 601:
  157. /***/ ((module) => {
  158.  
  159.  
  160.  
  161. module.exports = function (i) {
  162. return i[1];
  163. };
  164.  
  165. /***/ }),
  166.  
  167. /***/ 62:
  168. /***/ ((module) => {
  169.  
  170.  
  171.  
  172. var stylesInDOM = [];
  173.  
  174. function getIndexByIdentifier(identifier) {
  175. var result = -1;
  176.  
  177. for (var i = 0; i < stylesInDOM.length; i++) {
  178. if (stylesInDOM[i].identifier === identifier) {
  179. result = i;
  180. break;
  181. }
  182. }
  183.  
  184. return result;
  185. }
  186.  
  187. function modulesToDom(list, options) {
  188. var idCountMap = {};
  189. var identifiers = [];
  190.  
  191. for (var i = 0; i < list.length; i++) {
  192. var item = list[i];
  193. var id = options.base ? item[0] + options.base : item[0];
  194. var count = idCountMap[id] || 0;
  195. var identifier = "".concat(id, " ").concat(count);
  196. idCountMap[id] = count + 1;
  197. var indexByIdentifier = getIndexByIdentifier(identifier);
  198. var obj = {
  199. css: item[1],
  200. media: item[2],
  201. sourceMap: item[3],
  202. supports: item[4],
  203. layer: item[5]
  204. };
  205.  
  206. if (indexByIdentifier !== -1) {
  207. stylesInDOM[indexByIdentifier].references++;
  208. stylesInDOM[indexByIdentifier].updater(obj);
  209. } else {
  210. var updater = addElementStyle(obj, options);
  211. options.byIndex = i;
  212. stylesInDOM.splice(i, 0, {
  213. identifier: identifier,
  214. updater: updater,
  215. references: 1
  216. });
  217. }
  218.  
  219. identifiers.push(identifier);
  220. }
  221.  
  222. return identifiers;
  223. }
  224.  
  225. function addElementStyle(obj, options) {
  226. var api = options.domAPI(options);
  227. api.update(obj);
  228.  
  229. var updater = function updater(newObj) {
  230. if (newObj) {
  231. if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {
  232. return;
  233. }
  234.  
  235. api.update(obj = newObj);
  236. } else {
  237. api.remove();
  238. }
  239. };
  240.  
  241. return updater;
  242. }
  243.  
  244. module.exports = function (list, options) {
  245. options = options || {};
  246. list = list || [];
  247. var lastIdentifiers = modulesToDom(list, options);
  248. return function update(newList) {
  249. newList = newList || [];
  250.  
  251. for (var i = 0; i < lastIdentifiers.length; i++) {
  252. var identifier = lastIdentifiers[i];
  253. var index = getIndexByIdentifier(identifier);
  254. stylesInDOM[index].references--;
  255. }
  256.  
  257. var newLastIdentifiers = modulesToDom(newList, options);
  258.  
  259. for (var _i = 0; _i < lastIdentifiers.length; _i++) {
  260. var _identifier = lastIdentifiers[_i];
  261.  
  262. var _index = getIndexByIdentifier(_identifier);
  263.  
  264. if (stylesInDOM[_index].references === 0) {
  265. stylesInDOM[_index].updater();
  266.  
  267. stylesInDOM.splice(_index, 1);
  268. }
  269. }
  270.  
  271. lastIdentifiers = newLastIdentifiers;
  272. };
  273. };
  274.  
  275. /***/ }),
  276.  
  277. /***/ 793:
  278. /***/ ((module) => {
  279.  
  280.  
  281.  
  282. var memo = {};
  283. /* istanbul ignore next */
  284.  
  285. function getTarget(target) {
  286. if (typeof memo[target] === "undefined") {
  287. var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself
  288.  
  289. if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
  290. try {
  291. // This will throw an exception if access to iframe is blocked
  292. // due to cross-origin restrictions
  293. styleTarget = styleTarget.contentDocument.head;
  294. } catch (e) {
  295. // istanbul ignore next
  296. styleTarget = null;
  297. }
  298. }
  299.  
  300. memo[target] = styleTarget;
  301. }
  302.  
  303. return memo[target];
  304. }
  305. /* istanbul ignore next */
  306.  
  307.  
  308. function insertBySelector(insert, style) {
  309. var target = getTarget(insert);
  310.  
  311. if (!target) {
  312. throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
  313. }
  314.  
  315. target.appendChild(style);
  316. }
  317.  
  318. module.exports = insertBySelector;
  319.  
  320. /***/ }),
  321.  
  322. /***/ 173:
  323. /***/ ((module) => {
  324.  
  325.  
  326.  
  327. /* istanbul ignore next */
  328. function insertStyleElement(options) {
  329. var element = document.createElement("style");
  330. options.setAttributes(element, options.attributes);
  331. options.insert(element, options.options);
  332. return element;
  333. }
  334.  
  335. module.exports = insertStyleElement;
  336.  
  337. /***/ }),
  338.  
  339. /***/ 892:
  340. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  341.  
  342.  
  343.  
  344. /* istanbul ignore next */
  345. function setAttributesWithoutAttributes(styleElement) {
  346. var nonce = true ? __webpack_require__.nc : 0;
  347.  
  348. if (nonce) {
  349. styleElement.setAttribute("nonce", nonce);
  350. }
  351. }
  352.  
  353. module.exports = setAttributesWithoutAttributes;
  354.  
  355. /***/ }),
  356.  
  357. /***/ 36:
  358. /***/ ((module) => {
  359.  
  360.  
  361.  
  362. /* istanbul ignore next */
  363. function apply(styleElement, options, obj) {
  364. var css = "";
  365.  
  366. if (obj.supports) {
  367. css += "@supports (".concat(obj.supports, ") {");
  368. }
  369.  
  370. if (obj.media) {
  371. css += "@media ".concat(obj.media, " {");
  372. }
  373.  
  374. var needLayer = typeof obj.layer !== "undefined";
  375.  
  376. if (needLayer) {
  377. css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {");
  378. }
  379.  
  380. css += obj.css;
  381.  
  382. if (needLayer) {
  383. css += "}";
  384. }
  385.  
  386. if (obj.media) {
  387. css += "}";
  388. }
  389.  
  390. if (obj.supports) {
  391. css += "}";
  392. }
  393.  
  394. var sourceMap = obj.sourceMap;
  395.  
  396. if (sourceMap && typeof btoa !== "undefined") {
  397. css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
  398. } // For old IE
  399.  
  400. /* istanbul ignore if */
  401.  
  402.  
  403. options.styleTagTransform(css, styleElement, options.options);
  404. }
  405.  
  406. function removeStyleElement(styleElement) {
  407. // istanbul ignore if
  408. if (styleElement.parentNode === null) {
  409. return false;
  410. }
  411.  
  412. styleElement.parentNode.removeChild(styleElement);
  413. }
  414. /* istanbul ignore next */
  415.  
  416.  
  417. function domAPI(options) {
  418. var styleElement = options.insertStyleElement(options);
  419. return {
  420. update: function update(obj) {
  421. apply(styleElement, options, obj);
  422. },
  423. remove: function remove() {
  424. removeStyleElement(styleElement);
  425. }
  426. };
  427. }
  428.  
  429. module.exports = domAPI;
  430.  
  431. /***/ }),
  432.  
  433. /***/ 464:
  434. /***/ ((module) => {
  435.  
  436.  
  437.  
  438. /* istanbul ignore next */
  439. function styleTagTransform(css, styleElement) {
  440. if (styleElement.styleSheet) {
  441. styleElement.styleSheet.cssText = css;
  442. } else {
  443. while (styleElement.firstChild) {
  444. styleElement.removeChild(styleElement.firstChild);
  445. }
  446.  
  447. styleElement.appendChild(document.createTextNode(css));
  448. }
  449. }
  450.  
  451. module.exports = styleTagTransform;
  452.  
  453. /***/ })
  454.  
  455. /******/ });
  456. /************************************************************************/
  457. /******/ // The module cache
  458. /******/ var __webpack_module_cache__ = {};
  459. /******/
  460. /******/ // The require function
  461. /******/ function __webpack_require__(moduleId) {
  462. /******/ // Check if module is in cache
  463. /******/ var cachedModule = __webpack_module_cache__[moduleId];
  464. /******/ if (cachedModule !== undefined) {
  465. /******/ return cachedModule.exports;
  466. /******/ }
  467. /******/ // Create a new module (and put it into the cache)
  468. /******/ var module = __webpack_module_cache__[moduleId] = {
  469. /******/ id: moduleId,
  470. /******/ // no module.loaded needed
  471. /******/ exports: {}
  472. /******/ };
  473. /******/
  474. /******/ // Execute the module function
  475. /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
  476. /******/
  477. /******/ // Return the exports of the module
  478. /******/ return module.exports;
  479. /******/ }
  480. /******/
  481. /************************************************************************/
  482. /******/ /* webpack/runtime/compat get default export */
  483. /******/ (() => {
  484. /******/ // getDefaultExport function for compatibility with non-harmony modules
  485. /******/ __webpack_require__.n = (module) => {
  486. /******/ var getter = module && module.__esModule ?
  487. /******/ () => (module['default']) :
  488. /******/ () => (module);
  489. /******/ __webpack_require__.d(getter, { a: getter });
  490. /******/ return getter;
  491. /******/ };
  492. /******/ })();
  493. /******/
  494. /******/ /* webpack/runtime/define property getters */
  495. /******/ (() => {
  496. /******/ // define getter functions for harmony exports
  497. /******/ __webpack_require__.d = (exports, definition) => {
  498. /******/ for(var key in definition) {
  499. /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
  500. /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
  501. /******/ }
  502. /******/ }
  503. /******/ };
  504. /******/ })();
  505. /******/
  506. /******/ /* webpack/runtime/hasOwnProperty shorthand */
  507. /******/ (() => {
  508. /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
  509. /******/ })();
  510. /******/
  511. /************************************************************************/
  512. var __webpack_exports__ = {};
  513. // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
  514. (() => {
  515.  
  516. // EXTERNAL MODULE: ../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js
  517. var injectStylesIntoStyleTag = __webpack_require__(62);
  518. var injectStylesIntoStyleTag_default = /*#__PURE__*/__webpack_require__.n(injectStylesIntoStyleTag);
  519. // EXTERNAL MODULE: ../../node_modules/style-loader/dist/runtime/styleDomAPI.js
  520. var styleDomAPI = __webpack_require__(36);
  521. var styleDomAPI_default = /*#__PURE__*/__webpack_require__.n(styleDomAPI);
  522. // EXTERNAL MODULE: ../../node_modules/style-loader/dist/runtime/insertBySelector.js
  523. var insertBySelector = __webpack_require__(793);
  524. var insertBySelector_default = /*#__PURE__*/__webpack_require__.n(insertBySelector);
  525. // EXTERNAL MODULE: ../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js
  526. var setAttributesWithoutAttributes = __webpack_require__(892);
  527. var setAttributesWithoutAttributes_default = /*#__PURE__*/__webpack_require__.n(setAttributesWithoutAttributes);
  528. // EXTERNAL MODULE: ../../node_modules/style-loader/dist/runtime/insertStyleElement.js
  529. var insertStyleElement = __webpack_require__(173);
  530. var insertStyleElement_default = /*#__PURE__*/__webpack_require__.n(insertStyleElement);
  531. // EXTERNAL MODULE: ../../node_modules/style-loader/dist/runtime/styleTagTransform.js
  532. var styleTagTransform = __webpack_require__(464);
  533. var styleTagTransform_default = /*#__PURE__*/__webpack_require__.n(styleTagTransform);
  534. // EXTERNAL MODULE: ../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./src/assets/styles/index.scss
  535. var styles = __webpack_require__(265);
  536. ;// CONCATENATED MODULE: ./src/assets/styles/index.scss
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548. var options = {};
  549.  
  550. options.styleTagTransform = (styleTagTransform_default());
  551. options.setAttributes = (setAttributesWithoutAttributes_default());
  552.  
  553. options.insert = insertBySelector_default().bind(null, "head");
  554.  
  555. options.domAPI = (styleDomAPI_default());
  556. options.insertStyleElement = (insertStyleElement_default());
  557.  
  558. var update = injectStylesIntoStyleTag_default()(styles/* default */.Z, options);
  559.  
  560.  
  561.  
  562.  
  563. /* harmony default export */ const assets_styles = (styles/* default */.Z && styles/* default.locals */.Z.locals ? styles/* default.locals */.Z.locals : undefined);
  564.  
  565. ;// CONCATENATED MODULE: ./src/components/ui.js
  566. let dq = document.querySelector.bind(document);
  567.  
  568. function UI() {
  569. this.init();
  570. }
  571.  
  572. UI.prototype.init = function () {
  573. console.log("欢迎使用博客整治插件");
  574. };
  575.  
  576. UI.prototype.mounted = function () {
  577. this.body = document.body;
  578. };
  579.  
  580. UI.prototype.processRemoveAD = function () {
  581. if (this.ads && this.ads.length) {
  582. console.log(this.ads.length);
  583. this.ads.forEach((selector) => {
  584. let ad = dq(selector);
  585. console.log(ad);
  586. if (ad) ad.parentElement.removeChild(ad);
  587. });
  588. }
  589. };
  590.  
  591. UI.prototype.process = function () {
  592. this.processRemoveAD();
  593. this.mode = "home";
  594. if (this.blog_content) {
  595. this.mode = "article";
  596. } else {
  597. this.mode = "menu";
  598. }
  599. this.body.classList.add(this.mode);
  600. };
  601.  
  602. UI.prototype.csdn = function () {
  603. this.body.classList.add("csdn");
  604. if (window.location.href.includes("category")) {
  605. this.body.classList.add("category");
  606. }
  607. this.blog_content = dq("#article_content");
  608. if (this.blog_content) {
  609. this.blog_content.classList.add("markdown-body");
  610. }
  611. this.ads = [".csdn-side-toolbar", "#asideHotArticle", "#asideArchive"];
  612. this.process();
  613. this.processCSDN();
  614. };
  615.  
  616. UI.prototype.cnblog = function () {
  617. this.body.classList.add("cnblog");
  618. this.blog_content = dq(".post_detail");
  619. if (this.blog_content) {
  620. this.blog_content.classList.add("markdown-body");
  621. }
  622. this.ads = [];
  623. this.process();
  624. };
  625.  
  626. UI.prototype.juejin = function () {
  627. this.body.classList.add("juejin");
  628. this.blog_content = dq(".article-area");
  629. if (this.blog_content) {
  630. this.blog_content.classList.add("markdown-body");
  631. }
  632. this.ads = [];
  633. this.process();
  634. };
  635.  
  636. UI.prototype.processCSDN = function () {
  637. window.onload = function () {
  638. // 去除剪贴板劫持
  639. csdn.copyright.textData = "";
  640. try {
  641. Object.defineProperty(window, "articleType", {
  642. value: 0,
  643. writable: false,
  644. configurable: false
  645. });
  646. $("#csdn-toolbar").css("border-bottom", "2px solid #409eff");
  647. } catch (err) {}
  648. // 修复无法复制
  649. $("pre").css("user-select", "auto");
  650. $("code").css("user-select", "auto");
  651. $("blockquote").css("user-select", "auto");
  652. // 免登录复制
  653. $(".hljs-button").removeClass("signin");
  654. $(".hljs-button").addClass("copy-button");
  655. $(".hljs-button").attr("onclick", "hljs.copyCode(event)");
  656. $(".hljs-button").attr("data-title", "免登录复制");
  657. setInterval(() => {
  658. $(".hljs-button").attr("data-title", "免登录复制");
  659. $(".passport-login-container").remove();
  660. }, 1000 / 60);
  661. };
  662. };
  663.  
  664. /* harmony default export */ const ui = (UI);
  665.  
  666. ;// CONCATENATED MODULE: ./src/main.js
  667.  
  668.  
  669.  
  670. let main_ui = new ui();
  671. (function () {
  672. window.addEventListener("DOMContentLoaded", function () {
  673. main_ui.mounted();
  674. let hostname = location.hostname;
  675. switch (hostname) {
  676. case "blog.csdn.net":
  677. main_ui.csdn();
  678. break;
  679. case "www.cnblogs.com":
  680. main_ui.cnblog();
  681. break;
  682. case "juejin.cn":
  683. main_ui.juejin();
  684. break;
  685. default:
  686. main_ui.csdn();
  687. break;
  688. }
  689. document.body.style.display = "block";
  690. });
  691. })();
  692.  
  693. })();
  694.  
  695. /******/ })()
  696. ;