博客整治

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

目前为 2021-12-01 提交的版本,查看 最新版本

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