/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__gm__ = __webpack_require__(1); // ==UserScript== // @name weicano // @namespace javran.github.io // @description Weibo.cn cleaner // @include https://weibo.cn/* // @version 1.2 // @grant GM_getValue // @grant GM_setValue // @require http://code.jquery.com/jquery-3.2.1.min.js // @require https://code.jquery.com/ui/1.12.1/jquery-ui.min.js // @require https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.min.js // @downloadURL https://update.greasyfork.icu/scripts/32127/weicano.user.js // @updateURL https://update.greasyfork.icu/scripts/32127/weicano.meta.js // ==/UserScript== const applyFilters = () => { const activeKeywords = _.flatMap( Object(__WEBPACK_IMPORTED_MODULE_0__gm__["a" /* getKeywords */])(), ([kw,active]) => active ? [kw] : [] ) const shouldBlock = node => { const jqNode = $(node) return activeKeywords.some(keyword => jqNode.find(`div:contains('${keyword}')`).length ) } $("html body div[id*='M_'].c").each((_ind,x) => { const jq = $(x) if (shouldBlock(x)) { jq.hide().next('.s').hide() } else { jq.show().next('.s').show() } }) } const mkDialogContent = () => { const jqDlg = $('#weicano-dialog') const dlg = jqDlg.dialog( { autoOpen: false, position: {my: 'top', at: 'bottom', of: '#weicano-entry'}, } ) const keywords = Object(__WEBPACK_IMPORTED_MODULE_0__gm__["a" /* getKeywords */])() jqDlg.empty() keywords.map(([keyword,active], ind) => { const kwId = `weicano-kw-toggle-${ind}` jqDlg.append( $(`
`).css({ width: '100%', display: 'flex', }).append( $('