Block somebody

在贴吧屏蔽某人,眼不见心不烦

目前為 2016-05-08 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name Block somebody
  3. // @author burningall
  4. // @description 在贴吧屏蔽某人,眼不见心不烦
  5. // @version 2016.05.08
  6. // @include *tieba.baidu.com/p/*
  7. // @include *tieba.baidu.com/*
  8. // @include *tieba.baidu.com/f?*
  9. // @grant GM_addStyle
  10. // @grant GM_getValue
  11. // @grant GM_setValue
  12. // @grant GM_listValues
  13. // @grant GM_deleteValue
  14. // @grant GM_registerMenuCommand
  15. // @run-at document-start
  16. // @compatible chrome 两个字,破费
  17. // @compatible firefox 两个字,破费
  18. // @license The MIT License (MIT); http://opensource.org/licenses/MIT
  19. // @supportURL http://www.burningall.com
  20. // @contributionURL troy450409405@gmail.com|alipay.com
  21. // @namespace https://greasyfork.org/zh-CN/users/3400-axetroy
  22. // ==/UserScript==
  23. /******/ (function(modules) { // webpackBootstrap
  24. /******/ // The module cache
  25. /******/ var installedModules = {};
  26.  
  27. /******/ // The require function
  28. /******/ function __webpack_require__(moduleId) {
  29.  
  30. /******/ // Check if module is in cache
  31. /******/ if(installedModules[moduleId])
  32. /******/ return installedModules[moduleId].exports;
  33.  
  34. /******/ // Create a new module (and put it into the cache)
  35. /******/ var module = installedModules[moduleId] = {
  36. /******/ exports: {},
  37. /******/ id: moduleId,
  38. /******/ loaded: false
  39. /******/ };
  40.  
  41. /******/ // Execute the module function
  42. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  43.  
  44. /******/ // Flag the module as loaded
  45. /******/ module.loaded = true;
  46.  
  47. /******/ // Return the exports of the module
  48. /******/ return module.exports;
  49. /******/ }
  50.  
  51.  
  52. /******/ // expose the modules object (__webpack_modules__)
  53. /******/ __webpack_require__.m = modules;
  54.  
  55. /******/ // expose the module cache
  56. /******/ __webpack_require__.c = installedModules;
  57.  
  58. /******/ // __webpack_public_path__
  59. /******/ __webpack_require__.p = "";
  60.  
  61. /******/ // Load entry module and return exports
  62. /******/ return __webpack_require__(0);
  63. /******/ })
  64. /************************************************************************/
  65. /******/ ([
  66. /* 0 */
  67. /***/ function(module, exports, __webpack_require__) {
  68.  
  69. module.exports = __webpack_require__(1);
  70.  
  71.  
  72. /***/ },
  73. /* 1 */
  74. /***/ function(module, exports, __webpack_require__) {
  75.  
  76. 'use strict';
  77.  
  78. var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
  79.  
  80. var _jqLite = __webpack_require__(2);
  81.  
  82. var _jqLite2 = _interopRequireDefault(_jqLite);
  83.  
  84. var _style = __webpack_require__(48);
  85.  
  86. var _style2 = _interopRequireDefault(_style);
  87.  
  88. var _blockIcon = __webpack_require__(50);
  89.  
  90. var _blockIcon2 = _interopRequireDefault(_blockIcon);
  91.  
  92. var _config = __webpack_require__(49);
  93.  
  94. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  95.  
  96. var blockIcon = _blockIcon2.default;
  97.  
  98. (0, _jqLite2.default)(function () {
  99. var config = {};
  100.  
  101. var common = {
  102. formatDate: function formatDate(date, fmt) {
  103. var o = {
  104. "M+": date.getMonth() + 1, //月份
  105. "d+": date.getDate(), //日
  106. "h+": date.getHours(), //小时
  107. "m+": date.getMinutes(), //分
  108. "s+": date.getSeconds(), //秒
  109. "q+": Math.floor((date.getMonth() + 3) / 3), //季度
  110. "S": date.getMilliseconds() //毫秒
  111. };
  112. if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
  113. for (var k in o) {
  114. if (new RegExp("(" + k + ")").test(fmt)) {
  115. fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length));
  116. }
  117. }
  118. return fmt;
  119. },
  120.  
  121. // 获取当前所在的位置,是贴吧列表,还是贴吧内容页
  122. getPosition: function getPosition() {
  123. var url = location.href;
  124. var postInside = /.*tieba.baidu.com\/p\/.*/ig;
  125. var postList = /.*tieba.baidu.com\/(f\?.*|[^p])/ig;
  126. return postInside.test(url) ? 'post' : postList.test(url) ? 'list' : null;
  127. },
  128.  
  129. // 获取当前页的贴吧名
  130. getBarName: function getBarName() {
  131. return (0, _jqLite2.default)(".card_title_fname").text().trim();
  132. },
  133.  
  134. // 显示控制面板
  135. showPanel: function showPanel() {
  136.  
  137. if ((0, _jqLite2.default)('#' + _config.MaskID).length) return;
  138.  
  139. var fragment = document.createDocumentFragment(); // 创建文档碎片
  140. var $$div = document.createElement('div'); // 创建div
  141. var $mask = (0, _jqLite2.default)($$div.cloneNode(false)); // 创建遮罩层
  142. var $panel = (0, _jqLite2.default)($$div.cloneNode(false)); // 创建控制面板
  143.  
  144. $mask.attr('id', _config.MaskID);
  145. $panel.attr('id', _config.PanelID);
  146.  
  147. $panel.html('\n<h2 class="block-title">控制面板</h2>\n<div class="block-container">\n \n <div class="block-menu">\n <ul>\n <li>配置</li>\n <li>屏蔽</li>\n <li>名单</li>\n </ul>\n </div>\n \n <div class="block-content">\n \n <session class="block-config">\n <h2>暂时没什么可配置的...</h2>\n </session>\n \n <session class="block-block">\n \n <form style="margin: 0 auto;">\n <div>\n <label>\n *贴吧ID\n </label>\n <input class="block-id form-control" type="text" placeholder="贴吧ID"/>\n </div>\n \n <div>\n <label>\n 屏蔽原因\n </label>\n <input class="block-reason form-control" type="text" placeholder="屏蔽原因"/>\n </div>\n \n <div>\n <label>\n 所在贴吧\n </label>\n <input class="block-bar form-control" type="text" placeholder="所在贴吧" value="' + common.getBarName() + '"/>\n </div>\n \n <input class="block-block-submit btn" type="button" value="提交"/>\n </form>\n \n </session>\n \n <session class="block-list">\n </session>\n </div>\n \n <div class="block-clear"></div>\n\n</div>\n ');
  148.  
  149. $mask.append($panel);
  150.  
  151. // 关掉控制面板
  152. $mask.click(function (e) {
  153. if ((0, _jqLite2.default)(e.target).attr('id') === _config.MaskID) $mask.remove();
  154. });
  155.  
  156. var $menu = (0, _jqLite2.default)('.block-menu ul li', $mask[0]);
  157. var $session = (0, _jqLite2.default)('.block-content session', $mask[0]);
  158. var $config = $session.eq(0);
  159. var $block = $session.eq(1);
  160. var $list = $session.eq(2);
  161.  
  162. // init the panel
  163. $menu.eq(0).addClass(_config.Active);
  164. $session.hide().eq(0).show();
  165.  
  166. // get the block list
  167. $list.html(function () {
  168. var GMList = GM_listValues();
  169. var list = [];
  170.  
  171. for (var i = 0; i < GMList.length; i++) {
  172. list[i] = GM_getValue(GMList[i]);
  173. }
  174.  
  175. var tableStr = '';
  176.  
  177. list.forEach(function (v, i) {
  178. var time = '';
  179. if (v.date) {
  180. var date = new Date(v.date);
  181. time = common.formatDate(date, 'yyyy-MM-dd');
  182. }
  183. tableStr += '\n <tr>\n <td>' + v.id + '</td>\n <td>' + v.bar + '</td>\n <td>' + v.reason + '</td>\n <td>' + time + '</td>\n <td>\n <a class="block-remove btn" href="javascript:void(0)" block-id="' + v.id + '" list-index="' + i + '">移除</a>\n </td>\n </tr>\n ';
  184. });
  185.  
  186. return '\n <table>\n <thead>\n <tr>\n <th><b>贴吧ID</b></th>\n <th><b>所在贴吧</b></th>\n <th><b>屏蔽理由</b></th>\n <th><b>屏蔽时间</b></th>\n <th><b>操作</b></th>\n </tr>\n </thead>\n <tbody>\n ' + tableStr + '\n </tbody>\n </table>\n ';
  187. }).find('.block-remove').click(function (e) {
  188. var $target = (0, _jqLite2.default)(e.target);
  189. var index = +$target.attr('list-index');
  190. var blockID = $target.attr('block-id');
  191.  
  192. $list.find('table>tbody>tr').each(function (ele) {
  193. if ((0, _jqLite2.default)(ele).find('.block-remove').attr('block-id') === blockID) {
  194. ele.remove();
  195. GM_deleteValue(blockID);
  196. }
  197. });
  198. });
  199.  
  200. // remove the panel
  201. $menu.click(function (e) {
  202. var index = (0, _jqLite2.default)(e.target).index;
  203. $menu.removeClass(_config.Active).eq(index).addClass(_config.Active);
  204. $session.hide().eq(index).show();
  205. return false;
  206. });
  207.  
  208. // block someone
  209. $block.find('.block-block-submit').click(function (e) {
  210. var _map = ['id', 'bar', 'reason'].map(function (name) {
  211. return $block.find('.block-' + name);
  212. });
  213.  
  214. var _map2 = _slicedToArray(_map, 3);
  215.  
  216. var $id = _map2[0];
  217. var $bar = _map2[1];
  218. var $reason = _map2[2];
  219.  
  220. var _map3 = [$id, $bar, $reason].map(function (input) {
  221. return input.val();
  222. });
  223.  
  224. var _map4 = _slicedToArray(_map3, 3);
  225.  
  226. var id = _map4[0];
  227. var bar = _map4[1];
  228. var reason = _map4[2];
  229.  
  230.  
  231. if (!id) return;
  232. GM_setValue(id, { id: id, bar: bar, reason: reason, date: new Date() });
  233. $id.val('');
  234. $reason.val('');
  235. });
  236.  
  237. fragment.appendChild($mask[0]);
  238. document.documentElement.appendChild(fragment);
  239. }
  240. };
  241.  
  242. (0, _jqLite2.default)(document).bind('keyup', function (e) {
  243. if (e.keyCode === 120) common.showPanel();
  244. });
  245.  
  246. GM_registerMenuCommand("控制面板", common.showPanel);
  247.  
  248. (0, _style2.default)();
  249.  
  250. var $icon = (0, _jqLite2.default)(document.createElement("a")).html(blockIcon);
  251.  
  252. var initCount = 0;
  253. var init = function init() {
  254. if (common.getPosition() === 'post') {
  255. initCount++;
  256. (0, _jqLite2.default)('.p_postlist .l_post').each(function (post) {
  257. var $name = (0, _jqLite2.default)(post).find('.d_author ul.p_author li.d_name');
  258. if (!$name[0]) return;
  259.  
  260. var id = $name.find('a[data-field].p_author_name').text().trim();
  261.  
  262. if (!id) return;
  263.  
  264. var icon = $icon[0].cloneNode(true);
  265.  
  266. if (GM_listValues().indexOf(id) > -1) return post.remove();
  267.  
  268. if ($name.find('svg').length) return;
  269.  
  270. (0, _jqLite2.default)(icon).click(function () {
  271. var bar = common.getBarName();
  272. var reason = '在帖子中选择';
  273.  
  274.  
  275. GM_setValue(id, { id: id, bar: bar, reason: reason, date: new Date() });
  276. (0, _jqLite2.default)('.p_postlist .l_post').each(function (ele) {
  277. var username = (0, _jqLite2.default)(ele).attr('data-field').replace(/\'/g, '"');
  278. if (!username) return;
  279. username = JSON.parse(username).author.user_name || JSON.parse(username).author.name_u;
  280. username = username.replace(/\&ie\=.*$/ig, '');
  281. username = decodeURI(username);
  282. if (username === id) ele.remove();
  283. });
  284. });
  285.  
  286. $name[0].appendChild(icon);
  287. });
  288. } else if (common.getPosition() === 'list') {
  289. (function () {
  290. var interval = setInterval(function () {
  291. var postList = (0, _jqLite2.default)('ul#thread_list li[data-field].j_thread_list');
  292. if (!postList.length) return;
  293.  
  294. clearInterval(interval);
  295. initCount++;
  296. postList.each(function (post) {
  297. var $name = (0, _jqLite2.default)(post).find('.j_threadlist_li_right .tb_icon_author');
  298. if (!$name[0]) return;
  299.  
  300. var id = $name.find('a[data-field].frs-author-name').text().trim();
  301. var icon = $icon[0].cloneNode(true);
  302.  
  303. if (GM_listValues().indexOf(id) > -1) return post.remove();
  304.  
  305. (0, _jqLite2.default)(icon).click(function () {
  306. var bar = common.getBarName();
  307. var reason = '贴吧首页选择';
  308.  
  309. if (!id) return;
  310. GM_setValue(id, { id: id, bar: bar, reason: reason, date: new Date() });
  311.  
  312. (0, _jqLite2.default)('ul#thread_list li[data-field].j_thread_list').each(function (_post) {
  313. var username = (0, _jqLite2.default)(_post).find('a[data-field].frs-author-name').text().trim();
  314. if (!username) return;
  315. if (username === id) _post.remove();
  316. });
  317. });
  318.  
  319. $name[0].appendChild(icon);
  320. });
  321. }, 100);
  322. })();
  323. }
  324. };
  325.  
  326. init();
  327.  
  328. (0, _jqLite2.default)(document).observe(function (target) {
  329. var addedNodes = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1];
  330. var removedNodes = arguments.length <= 2 || arguments[2] === undefined ? [] : arguments[2];
  331.  
  332.  
  333. addedNodes = Array.from(addedNodes);
  334.  
  335. // if (!addedNodes || !addedNodes.length || removedNodes.length) return;
  336.  
  337. addedNodes.forEach(function (node) {
  338. // 翻页
  339. if (node.id === 'content_leftList' || node.id === 'j_p_postlist') {
  340. initCount > 0 && init();
  341. }
  342. });
  343.  
  344. // 楼中楼翻页
  345. if (target && (0, _jqLite2.default)(target).hasClass('j_lzl_m_w')) {
  346. (function () {
  347.  
  348. var $lzlList = (0, _jqLite2.default)(target).find('li.lzl_single_post');
  349.  
  350. $lzlList.each(function (lzl) {
  351. var $lzl = (0, _jqLite2.default)(lzl);
  352. if ($lzl.attr('filter')) return;
  353.  
  354. $lzl.attr('filter', true);
  355. var id = JSON.parse($lzl.attr('data-field').replace(/\'/g, '"')).user_name;
  356. id = decodeURI(id);
  357.  
  358. if (!id) return;
  359.  
  360. if (GM_listValues().indexOf(id) > -1) return lzl.remove();
  361.  
  362. var $name = $lzl.find('.lzl_cnt');
  363.  
  364. if ($name.find('svg').length) return;
  365.  
  366. var icon = $icon[0].cloneNode(true);
  367.  
  368. (0, _jqLite2.default)(icon).click(function (e) {
  369. var bar = common.getBarName();
  370. var reason = '楼中楼选择';
  371.  
  372.  
  373. GM_setValue(id, { id: id, bar: bar, reason: reason, date: new Date() });
  374.  
  375. $lzlList.each(function (_lzl) {
  376. var username = (0, _jqLite2.default)(_lzl).find('div.lzl_cnt a.j_user_card').text().trim();
  377. if (!username) return;
  378. if (username === id) _lzl.remove();
  379. });
  380. });
  381.  
  382. $name[0].insertBefore(icon, $name[0].childNodes[0]);
  383. });
  384. })();
  385. }
  386.  
  387. //
  388. var $lzlList = (0, _jqLite2.default)('ul.j_lzl_m_w');
  389. if (!$lzlList.length) return;
  390.  
  391. $lzlList.each(function (lzls) {
  392. if ((0, _jqLite2.default)(lzls).attr('filter')) return;
  393.  
  394. (0, _jqLite2.default)(lzls).attr('filter', true);
  395.  
  396. (0, _jqLite2.default)(lzls).find('li.lzl_single_post').each(function (lzl) {
  397. var $lzl = (0, _jqLite2.default)(lzl);
  398. var $name = $lzl.find('.lzl_cnt');
  399.  
  400. if ($name.find('svg').length) return;
  401.  
  402. var icon = $icon[0].cloneNode(true);
  403.  
  404. var id = JSON.parse($lzl.attr('data-field').replace(/\'/g, '"')).user_name;
  405.  
  406. if (GM_listValues().indexOf(id) > -1) return lzl.remove();
  407.  
  408. if (!id) return;
  409.  
  410. (0, _jqLite2.default)(icon).click(function (e) {
  411. var bar = common.getBarName();
  412. var reason = '楼中楼选择';
  413.  
  414. GM_setValue(id, { id: id, bar: bar, reason: reason, date: new Date() });
  415. // 删除当前楼中楼的
  416. $lzlList.each(function (_lzl) {
  417. var $floor = (0, _jqLite2.default)(_lzl).find('div.lzl_cnt');
  418. $floor.each(function (_post) {
  419. var username = (0, _jqLite2.default)(_post).find('a.j_user_card').text().trim();
  420. if (!username) return;
  421. if (username === id) _post.parentElement.remove();
  422. });
  423. });
  424. // 删除帖子里面楼层的
  425. init();
  426. });
  427. $name[0].insertBefore(icon, $name[0].childNodes[0]);
  428. });
  429. });
  430. });
  431. });
  432.  
  433. /***/ },
  434. /* 2 */
  435. /***/ function(module, exports, __webpack_require__) {
  436.  
  437. 'use strict';
  438.  
  439. // es6 Array.from
  440.  
  441. Object.defineProperty(exports, "__esModule", {
  442. value: true
  443. });
  444.  
  445. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
  446.  
  447. var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
  448. // es6 Object.assign
  449.  
  450.  
  451. __webpack_require__(3);
  452.  
  453. __webpack_require__(36);
  454.  
  455. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  456.  
  457. var noop = function noop(x) {
  458. return x;
  459. };
  460.  
  461. var jqLite = function () {
  462. function jqLite() {
  463. var _this = this;
  464.  
  465. var selectors = arguments.length <= 0 || arguments[0] === undefined ? '' : arguments[0];
  466. var context = arguments.length <= 1 || arguments[1] === undefined ? document : arguments[1];
  467.  
  468. _classCallCheck(this, jqLite);
  469.  
  470. this.selectors = selectors;
  471. this.context = context;
  472. this.length = 0;
  473.  
  474. switch (typeof selectors === 'undefined' ? 'undefined' : _typeof(selectors)) {
  475. case 'undefined':
  476. break;
  477. case 'string':
  478. Array.from(context.querySelectorAll(selectors), function (ele, i) {
  479. _this[i] = ele;
  480. _this.length++;
  481. }, this);
  482. break;
  483. case 'object':
  484. if (selectors.length) {
  485. Array.from(selectors, function (ele, i) {
  486. _this[i] = ele;
  487. _this.length++;
  488. }, this);
  489. } else {
  490. this[0] = selectors;
  491. this.length = 1;
  492. }
  493. break;
  494. case 'function':
  495. this.ready(selectors);
  496. break;
  497. default:
  498.  
  499. }
  500. }
  501.  
  502. _createClass(jqLite, [{
  503. key: 'eq',
  504. value: function eq() {
  505. var n = arguments.length <= 0 || arguments[0] === undefined ? 0 : arguments[0];
  506.  
  507. return new jqLite(this[n]);
  508. }
  509. }, {
  510. key: 'find',
  511. value: function find(selectors) {
  512. return new jqLite(selectors, this[0]);
  513. }
  514. }, {
  515. key: 'each',
  516. value: function each() {
  517. var fn = arguments.length <= 0 || arguments[0] === undefined ? noop : arguments[0];
  518.  
  519. for (var i = 0; i < this.length; i++) {
  520. fn.call(this, this[i], i);
  521. }
  522. return this;
  523. }
  524. }, {
  525. key: 'bind',
  526. value: function bind() {
  527. var types = arguments.length <= 0 || arguments[0] === undefined ? '' : arguments[0];
  528. var fn = arguments.length <= 1 || arguments[1] === undefined ? noop : arguments[1];
  529.  
  530. this.each(function (ele) {
  531. types.trim().split(/\s{1,}/).forEach(function (type) {
  532. ele.addEventListener(type, function (e) {
  533. var target = e.target || e.srcElement;
  534. if (fn.call(target, e) === false) {
  535. e.returnValue = true;
  536. e.cancelBubble = true;
  537. e.preventDefault && e.preventDefault();
  538. e.stopPropagation && e.stopPropagation();
  539. return false;
  540. }
  541. }, false);
  542. });
  543. });
  544. }
  545. }, {
  546. key: 'click',
  547. value: function click() {
  548. var fn = arguments.length <= 0 || arguments[0] === undefined ? noop : arguments[0];
  549.  
  550. this.bind('click', fn);
  551. return this;
  552. }
  553. }, {
  554. key: 'ready',
  555. value: function ready() {
  556. var _this2 = this;
  557.  
  558. var fn = arguments.length <= 0 || arguments[0] === undefined ? noop : arguments[0];
  559.  
  560. window.addEventListener('DOMContentLoaded', function (e) {
  561. fn.call(_this2, e);
  562. }, false);
  563. }
  564. }, {
  565. key: 'observe',
  566. value: function observe() {
  567. var _this3 = this;
  568.  
  569. var fn = arguments.length <= 0 || arguments[0] === undefined ? noop : arguments[0];
  570. var config = arguments.length <= 1 || arguments[1] === undefined ? { childList: true, subtree: true } : arguments[1];
  571.  
  572. this.each(function (ele) {
  573. var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
  574. var observer = new MutationObserver(function (mutations) {
  575. mutations.forEach(function (mutation) {
  576. fn.call(_this3, mutation.target, mutation.addedNodes, mutation.removedNodes);
  577. });
  578. });
  579. observer.observe(ele, config);
  580. });
  581. return this;
  582. }
  583. }, {
  584. key: 'attr',
  585. value: function (_attr) {
  586. function attr(_x, _x2) {
  587. return _attr.apply(this, arguments);
  588. }
  589.  
  590. attr.toString = function () {
  591. return _attr.toString();
  592. };
  593.  
  594. return attr;
  595. }(function (attr, value) {
  596. // one agm
  597. if (arguments.length === 1) {
  598. // get attr value
  599. if (typeof attr === 'string') {
  600. return this[0].getAttribute(attr);
  601. }
  602. // set attr with a json
  603. else if ((typeof attr === 'undefined' ? 'undefined' : _typeof(attr)) === 'object') {
  604. this.each(function (ele) {
  605. for (var at in attr) {
  606. if (attr.hasOwnProperty(at)) {
  607. ele.setAttribute(at, value);
  608. }
  609. }
  610. });
  611. return value;
  612. }
  613. }
  614. // set
  615. else if (arguments.length === 2) {
  616. this.each(function (ele) {
  617. ele.setAttribute(attr, value);
  618. });
  619. return this;
  620. } else {
  621. return this;
  622. }
  623. })
  624. }, {
  625. key: 'removeAttr',
  626. value: function removeAttr(attr) {
  627. if (arguments.length === 1) {
  628. this.each(function (ele) {
  629. ele.removeAttribute(attr);
  630. });
  631. }
  632. return this;
  633. }
  634. }, {
  635. key: 'remove',
  636. value: function remove() {
  637. this.each(function (ele) {
  638. ele.remove();
  639. });
  640. this.length = 0;
  641. return this;
  642. }
  643.  
  644. // get the element style
  645.  
  646. }, {
  647. key: 'style',
  648. value: function style(attr) {
  649. return this[0].currentStyle ? this[0].currentStyle[attr] : getComputedStyle(this[0])[attr];
  650. }
  651.  
  652. // (attr,value) || 'string' || {}
  653.  
  654. }, {
  655. key: 'css',
  656. value: function css() {
  657. for (var _len = arguments.length, agm = Array(_len), _key = 0; _key < _len; _key++) {
  658. agm[_key] = arguments[_key];
  659. }
  660.  
  661. if (agm.length === 1) {
  662. // get style
  663. if (typeof agm[0] === 'string') {
  664. // set style as a long text
  665. if (/:/ig.test(agm[0])) {
  666. this.each(function (ele) {
  667. ele.style.cssText = attr;
  668. });
  669. } else {
  670. return this[0].currentStyle ? this[0].currentStyle[agm[0]] : getComputedStyle(this[0])[agm[0]];
  671. }
  672. }
  673. // set style as a object
  674. else {
  675. this.each(function (ele) {
  676. for (var _attr2 in agm[0]) {
  677. if (agm[0].hasOwnProperty(_attr2)) {
  678. ele.style[_attr2] = agm[0][_attr2];
  679. }
  680. }
  681. });
  682. }
  683. }
  684. // set as (key,value)
  685. else if (agm.length === 2) {
  686. this.each(function (ele) {
  687. ele.style[agm[0]] = agm[1];
  688. });
  689. }
  690. return this;
  691. }
  692. }, {
  693. key: 'width',
  694. value: function width(value) {
  695. var element = this[0];
  696. // window or document
  697. if (element.window === element || element.body) {
  698. return document.body.scrollWidth > document.documentElement.scrollWidth ? document.body.scrollWidth : document.documentElement.scrollWidth;
  699. }
  700. // set width
  701. else if (value) {
  702. this.each(function (ele) {
  703. ele.style.width = value + 'px';
  704. });
  705. return this;
  706. }
  707. // get width
  708. else {
  709. return this[0].offsetWidth || parseFloat(this.style('width'));
  710. }
  711. }
  712. }, {
  713. key: 'height',
  714. value: function height(value) {
  715. var ele = this[0];
  716. // window or document
  717. if (ele.window === ele || ele.body) {
  718. return document.body.scrollHeight > document.documentElement.scrollHeight ? document.body.scrollHeight : document.documentElement.scrollHeight;
  719. }
  720. // set height
  721. else if (value) {
  722. this.each(function (ele) {
  723. ele.style.height = value + 'px';
  724. });
  725. return this;
  726. }
  727. // get height
  728. else {
  729. return this[0].offsetHeight || parseFloat(this.style('height'));
  730. }
  731. }
  732. }, {
  733. key: 'html',
  734. value: function html(value) {
  735. if (value !== undefined) {
  736. this.each(function (ele) {
  737. ele.innerHTML = typeof value === 'function' ? value(ele) : value;
  738. });
  739. } else {
  740. return this[0].innerHTML;
  741. }
  742. return this;
  743. }
  744. }, {
  745. key: 'text',
  746. value: function text(value) {
  747. if (value === undefined) return this[0].innerText || this[0].textContent;
  748.  
  749. this.each(function (ele) {
  750. ele.innerText = ele.textContent = value;
  751. });
  752. return this;
  753. }
  754. }, {
  755. key: 'val',
  756. value: function val(value) {
  757. if (value === undefined) return this[0].value;
  758. this.each(function (ele) {
  759. ele.value = value;
  760. });
  761. return this;
  762. }
  763. }, {
  764. key: 'show',
  765. value: function show() {
  766. this.each(function (ele) {
  767. ele.style.display = '';
  768. });
  769. return this;
  770. }
  771. }, {
  772. key: 'hide',
  773. value: function hide() {
  774. this.each(function (ele) {
  775. ele.style.display = 'none';
  776. });
  777. return this;
  778. }
  779.  
  780. // content str || jqLite Object || DOM
  781. // here is jqLite Object
  782.  
  783. }, {
  784. key: 'append',
  785. value: function append(content) {
  786. this.each(function (ele) {
  787. ele.appendChild(content[0]);
  788. });
  789. return this;
  790. }
  791. }, {
  792. key: 'prepend',
  793.  
  794.  
  795. // content str || jqLite Object || DOM
  796. // here is jqLite Object
  797. value: function prepend(content) {
  798. this.each(function (ele) {
  799. ele.insertBefore(content[0], ele.children[0]);
  800. });
  801. return this;
  802. }
  803. }, {
  804. key: 'hasClass',
  805. value: function hasClass(className) {
  806. if (!this[0]) return false;
  807. return this[0].classList.contains(className);
  808. }
  809. }, {
  810. key: 'addClass',
  811. value: function addClass(className) {
  812. this.each(function (ele) {
  813. ele.classList.add(className);
  814. });
  815. return this;
  816. }
  817. }, {
  818. key: 'removeClass',
  819. value: function removeClass(className) {
  820. this.each(function (ele) {
  821. ele.classList.remove(className);
  822. });
  823. return this;
  824. }
  825. }, {
  826. key: 'index',
  827. get: function get() {
  828. var index = 0;
  829. var brothers = this[0].parentNode.children;
  830. for (var i = 0; i < brothers.length; i++) {
  831. if (brothers[i] == this[0]) {
  832. index = i;
  833. break;
  834. }
  835. }
  836. return index;
  837. }
  838. }], [{
  839. key: 'fn',
  840. get: function get() {
  841. var visible = function visible(ele) {
  842. var pos = ele.getBoundingClientRect();
  843. var w = void 0;
  844. var h = void 0;
  845. var inViewPort = void 0;
  846. var docEle = document.documentElement;
  847. var docBody = document.body;
  848. if (docEle.getBoundingClientRect) {
  849. w = docEle.clientWidth || docBody.clientWidth;
  850. h = docEle.clientHeight || docBody.clientHeight;
  851. inViewPort = pos.top > h || pos.bottom < 0 || pos.left > w || pos.right < 0;
  852. return inViewPort ? false : true;
  853. }
  854. };
  855. var merge = function merge() {
  856. for (var _len2 = arguments.length, sources = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  857. sources[_key2] = arguments[_key2];
  858. }
  859.  
  860. return Object.assign.apply(Object, [{}].concat(sources));
  861. };
  862. return {
  863. visible: visible,
  864. merge: merge
  865. };
  866. }
  867. }]);
  868.  
  869. return jqLite;
  870. }();
  871.  
  872. var $ = function $() {
  873. var selectors = arguments.length <= 0 || arguments[0] === undefined ? '' : arguments[0];
  874. var context = arguments.length <= 1 || arguments[1] === undefined ? document : arguments[1];
  875.  
  876. return new jqLite(selectors, context);
  877. };
  878. $.fn = jqLite.fn;
  879.  
  880. exports.default = $;
  881.  
  882. /***/ },
  883. /* 3 */
  884. /***/ function(module, exports, __webpack_require__) {
  885.  
  886. 'use strict';
  887. var ctx = __webpack_require__(4)
  888. , $export = __webpack_require__(6)
  889. , toObject = __webpack_require__(22)
  890. , call = __webpack_require__(24)
  891. , isArrayIter = __webpack_require__(25)
  892. , toLength = __webpack_require__(29)
  893. , createProperty = __webpack_require__(31)
  894. , getIterFn = __webpack_require__(32);
  895.  
  896. $export($export.S + $export.F * !__webpack_require__(35)(function(iter){ Array.from(iter); }), 'Array', {
  897. // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
  898. from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){
  899. var O = toObject(arrayLike)
  900. , C = typeof this == 'function' ? this : Array
  901. , aLen = arguments.length
  902. , mapfn = aLen > 1 ? arguments[1] : undefined
  903. , mapping = mapfn !== undefined
  904. , index = 0
  905. , iterFn = getIterFn(O)
  906. , length, result, step, iterator;
  907. if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
  908. // if object isn't iterable or it's array with default iterator - use simple case
  909. if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){
  910. for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){
  911. createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
  912. }
  913. } else {
  914. length = toLength(O.length);
  915. for(result = new C(length); length > index; index++){
  916. createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
  917. }
  918. }
  919. result.length = index;
  920. return result;
  921. }
  922. });
  923.  
  924.  
  925. /***/ },
  926. /* 4 */
  927. /***/ function(module, exports, __webpack_require__) {
  928.  
  929. // optional / simple context binding
  930. var aFunction = __webpack_require__(5);
  931. module.exports = function(fn, that, length){
  932. aFunction(fn);
  933. if(that === undefined)return fn;
  934. switch(length){
  935. case 1: return function(a){
  936. return fn.call(that, a);
  937. };
  938. case 2: return function(a, b){
  939. return fn.call(that, a, b);
  940. };
  941. case 3: return function(a, b, c){
  942. return fn.call(that, a, b, c);
  943. };
  944. }
  945. return function(/* ...args */){
  946. return fn.apply(that, arguments);
  947. };
  948. };
  949.  
  950. /***/ },
  951. /* 5 */
  952. /***/ function(module, exports) {
  953.  
  954. module.exports = function(it){
  955. if(typeof it != 'function')throw TypeError(it + ' is not a function!');
  956. return it;
  957. };
  958.  
  959. /***/ },
  960. /* 6 */
  961. /***/ function(module, exports, __webpack_require__) {
  962.  
  963. var global = __webpack_require__(7)
  964. , core = __webpack_require__(8)
  965. , hide = __webpack_require__(9)
  966. , redefine = __webpack_require__(19)
  967. , ctx = __webpack_require__(4)
  968. , PROTOTYPE = 'prototype';
  969.  
  970. var $export = function(type, name, source){
  971. var IS_FORCED = type & $export.F
  972. , IS_GLOBAL = type & $export.G
  973. , IS_STATIC = type & $export.S
  974. , IS_PROTO = type & $export.P
  975. , IS_BIND = type & $export.B
  976. , target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]
  977. , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
  978. , expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {})
  979. , key, own, out, exp;
  980. if(IS_GLOBAL)source = name;
  981. for(key in source){
  982. // contains in native
  983. own = !IS_FORCED && target && target[key] !== undefined;
  984. // export native or passed
  985. out = (own ? target : source)[key];
  986. // bind timers to global for call from export context
  987. exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
  988. // extend global
  989. if(target)redefine(target, key, out, type & $export.U);
  990. // export
  991. if(exports[key] != out)hide(exports, key, exp);
  992. if(IS_PROTO && expProto[key] != out)expProto[key] = out;
  993. }
  994. };
  995. global.core = core;
  996. // type bitmap
  997. $export.F = 1; // forced
  998. $export.G = 2; // global
  999. $export.S = 4; // static
  1000. $export.P = 8; // proto
  1001. $export.B = 16; // bind
  1002. $export.W = 32; // wrap
  1003. $export.U = 64; // safe
  1004. $export.R = 128; // real proto method for `library`
  1005. module.exports = $export;
  1006.  
  1007. /***/ },
  1008. /* 7 */
  1009. /***/ function(module, exports) {
  1010.  
  1011. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  1012. var global = module.exports = typeof window != 'undefined' && window.Math == Math
  1013. ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
  1014. if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
  1015.  
  1016. /***/ },
  1017. /* 8 */
  1018. /***/ function(module, exports) {
  1019.  
  1020. var core = module.exports = {version: '2.3.0'};
  1021. if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
  1022.  
  1023. /***/ },
  1024. /* 9 */
  1025. /***/ function(module, exports, __webpack_require__) {
  1026.  
  1027. var dP = __webpack_require__(10)
  1028. , createDesc = __webpack_require__(18);
  1029. module.exports = __webpack_require__(14) ? function(object, key, value){
  1030. return dP.f(object, key, createDesc(1, value));
  1031. } : function(object, key, value){
  1032. object[key] = value;
  1033. return object;
  1034. };
  1035.  
  1036. /***/ },
  1037. /* 10 */
  1038. /***/ function(module, exports, __webpack_require__) {
  1039.  
  1040. var anObject = __webpack_require__(11)
  1041. , IE8_DOM_DEFINE = __webpack_require__(13)
  1042. , toPrimitive = __webpack_require__(17)
  1043. , dP = Object.defineProperty;
  1044.  
  1045. exports.f = __webpack_require__(14) ? Object.defineProperty : function defineProperty(O, P, Attributes){
  1046. anObject(O);
  1047. P = toPrimitive(P, true);
  1048. anObject(Attributes);
  1049. if(IE8_DOM_DEFINE)try {
  1050. return dP(O, P, Attributes);
  1051. } catch(e){ /* empty */ }
  1052. if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
  1053. if('value' in Attributes)O[P] = Attributes.value;
  1054. return O;
  1055. };
  1056.  
  1057. /***/ },
  1058. /* 11 */
  1059. /***/ function(module, exports, __webpack_require__) {
  1060.  
  1061. var isObject = __webpack_require__(12);
  1062. module.exports = function(it){
  1063. if(!isObject(it))throw TypeError(it + ' is not an object!');
  1064. return it;
  1065. };
  1066.  
  1067. /***/ },
  1068. /* 12 */
  1069. /***/ function(module, exports) {
  1070.  
  1071. module.exports = function(it){
  1072. return typeof it === 'object' ? it !== null : typeof it === 'function';
  1073. };
  1074.  
  1075. /***/ },
  1076. /* 13 */
  1077. /***/ function(module, exports, __webpack_require__) {
  1078.  
  1079. module.exports = !__webpack_require__(14) && !__webpack_require__(15)(function(){
  1080. return Object.defineProperty(__webpack_require__(16)('div'), 'a', {get: function(){ return 7; }}).a != 7;
  1081. });
  1082.  
  1083. /***/ },
  1084. /* 14 */
  1085. /***/ function(module, exports, __webpack_require__) {
  1086.  
  1087. // Thank's IE8 for his funny defineProperty
  1088. module.exports = !__webpack_require__(15)(function(){
  1089. return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
  1090. });
  1091.  
  1092. /***/ },
  1093. /* 15 */
  1094. /***/ function(module, exports) {
  1095.  
  1096. module.exports = function(exec){
  1097. try {
  1098. return !!exec();
  1099. } catch(e){
  1100. return true;
  1101. }
  1102. };
  1103.  
  1104. /***/ },
  1105. /* 16 */
  1106. /***/ function(module, exports, __webpack_require__) {
  1107.  
  1108. var isObject = __webpack_require__(12)
  1109. , document = __webpack_require__(7).document
  1110. // in old IE typeof document.createElement is 'object'
  1111. , is = isObject(document) && isObject(document.createElement);
  1112. module.exports = function(it){
  1113. return is ? document.createElement(it) : {};
  1114. };
  1115.  
  1116. /***/ },
  1117. /* 17 */
  1118. /***/ function(module, exports, __webpack_require__) {
  1119.  
  1120. // 7.1.1 ToPrimitive(input [, PreferredType])
  1121. var isObject = __webpack_require__(12);
  1122. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  1123. // and the second argument - flag - preferred type is a string
  1124. module.exports = function(it, S){
  1125. if(!isObject(it))return it;
  1126. var fn, val;
  1127. if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
  1128. if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
  1129. if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
  1130. throw TypeError("Can't convert object to primitive value");
  1131. };
  1132.  
  1133. /***/ },
  1134. /* 18 */
  1135. /***/ function(module, exports) {
  1136.  
  1137. module.exports = function(bitmap, value){
  1138. return {
  1139. enumerable : !(bitmap & 1),
  1140. configurable: !(bitmap & 2),
  1141. writable : !(bitmap & 4),
  1142. value : value
  1143. };
  1144. };
  1145.  
  1146. /***/ },
  1147. /* 19 */
  1148. /***/ function(module, exports, __webpack_require__) {
  1149.  
  1150. var global = __webpack_require__(7)
  1151. , hide = __webpack_require__(9)
  1152. , has = __webpack_require__(20)
  1153. , SRC = __webpack_require__(21)('src')
  1154. , TO_STRING = 'toString'
  1155. , $toString = Function[TO_STRING]
  1156. , TPL = ('' + $toString).split(TO_STRING);
  1157.  
  1158. __webpack_require__(8).inspectSource = function(it){
  1159. return $toString.call(it);
  1160. };
  1161.  
  1162. (module.exports = function(O, key, val, safe){
  1163. var isFunction = typeof val == 'function';
  1164. if(isFunction)has(val, 'name') || hide(val, 'name', key);
  1165. if(O[key] === val)return;
  1166. if(isFunction)has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
  1167. if(O === global){
  1168. O[key] = val;
  1169. } else {
  1170. if(!safe){
  1171. delete O[key];
  1172. hide(O, key, val);
  1173. } else {
  1174. if(O[key])O[key] = val;
  1175. else hide(O, key, val);
  1176. }
  1177. }
  1178. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  1179. })(Function.prototype, TO_STRING, function toString(){
  1180. return typeof this == 'function' && this[SRC] || $toString.call(this);
  1181. });
  1182.  
  1183. /***/ },
  1184. /* 20 */
  1185. /***/ function(module, exports) {
  1186.  
  1187. var hasOwnProperty = {}.hasOwnProperty;
  1188. module.exports = function(it, key){
  1189. return hasOwnProperty.call(it, key);
  1190. };
  1191.  
  1192. /***/ },
  1193. /* 21 */
  1194. /***/ function(module, exports) {
  1195.  
  1196. var id = 0
  1197. , px = Math.random();
  1198. module.exports = function(key){
  1199. return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
  1200. };
  1201.  
  1202. /***/ },
  1203. /* 22 */
  1204. /***/ function(module, exports, __webpack_require__) {
  1205.  
  1206. // 7.1.13 ToObject(argument)
  1207. var defined = __webpack_require__(23);
  1208. module.exports = function(it){
  1209. return Object(defined(it));
  1210. };
  1211.  
  1212. /***/ },
  1213. /* 23 */
  1214. /***/ function(module, exports) {
  1215.  
  1216. // 7.2.1 RequireObjectCoercible(argument)
  1217. module.exports = function(it){
  1218. if(it == undefined)throw TypeError("Can't call method on " + it);
  1219. return it;
  1220. };
  1221.  
  1222. /***/ },
  1223. /* 24 */
  1224. /***/ function(module, exports, __webpack_require__) {
  1225.  
  1226. // call something on iterator step with safe closing on error
  1227. var anObject = __webpack_require__(11);
  1228. module.exports = function(iterator, fn, value, entries){
  1229. try {
  1230. return entries ? fn(anObject(value)[0], value[1]) : fn(value);
  1231. // 7.4.6 IteratorClose(iterator, completion)
  1232. } catch(e){
  1233. var ret = iterator['return'];
  1234. if(ret !== undefined)anObject(ret.call(iterator));
  1235. throw e;
  1236. }
  1237. };
  1238.  
  1239. /***/ },
  1240. /* 25 */
  1241. /***/ function(module, exports, __webpack_require__) {
  1242.  
  1243. // check on default Array iterator
  1244. var Iterators = __webpack_require__(26)
  1245. , ITERATOR = __webpack_require__(27)('iterator')
  1246. , ArrayProto = Array.prototype;
  1247.  
  1248. module.exports = function(it){
  1249. return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
  1250. };
  1251.  
  1252. /***/ },
  1253. /* 26 */
  1254. /***/ function(module, exports) {
  1255.  
  1256. module.exports = {};
  1257.  
  1258. /***/ },
  1259. /* 27 */
  1260. /***/ function(module, exports, __webpack_require__) {
  1261.  
  1262. var store = __webpack_require__(28)('wks')
  1263. , uid = __webpack_require__(21)
  1264. , Symbol = __webpack_require__(7).Symbol
  1265. , USE_SYMBOL = typeof Symbol == 'function';
  1266.  
  1267. var $exports = module.exports = function(name){
  1268. return store[name] || (store[name] =
  1269. USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
  1270. };
  1271.  
  1272. $exports.store = store;
  1273.  
  1274. /***/ },
  1275. /* 28 */
  1276. /***/ function(module, exports, __webpack_require__) {
  1277.  
  1278. var global = __webpack_require__(7)
  1279. , SHARED = '__core-js_shared__'
  1280. , store = global[SHARED] || (global[SHARED] = {});
  1281. module.exports = function(key){
  1282. return store[key] || (store[key] = {});
  1283. };
  1284.  
  1285. /***/ },
  1286. /* 29 */
  1287. /***/ function(module, exports, __webpack_require__) {
  1288.  
  1289. // 7.1.15 ToLength
  1290. var toInteger = __webpack_require__(30)
  1291. , min = Math.min;
  1292. module.exports = function(it){
  1293. return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
  1294. };
  1295.  
  1296. /***/ },
  1297. /* 30 */
  1298. /***/ function(module, exports) {
  1299.  
  1300. // 7.1.4 ToInteger
  1301. var ceil = Math.ceil
  1302. , floor = Math.floor;
  1303. module.exports = function(it){
  1304. return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
  1305. };
  1306.  
  1307. /***/ },
  1308. /* 31 */
  1309. /***/ function(module, exports, __webpack_require__) {
  1310.  
  1311. 'use strict';
  1312. var $defineProperty = __webpack_require__(10)
  1313. , createDesc = __webpack_require__(18);
  1314.  
  1315. module.exports = function(object, index, value){
  1316. if(index in object)$defineProperty.f(object, index, createDesc(0, value));
  1317. else object[index] = value;
  1318. };
  1319.  
  1320. /***/ },
  1321. /* 32 */
  1322. /***/ function(module, exports, __webpack_require__) {
  1323.  
  1324. var classof = __webpack_require__(33)
  1325. , ITERATOR = __webpack_require__(27)('iterator')
  1326. , Iterators = __webpack_require__(26);
  1327. module.exports = __webpack_require__(8).getIteratorMethod = function(it){
  1328. if(it != undefined)return it[ITERATOR]
  1329. || it['@@iterator']
  1330. || Iterators[classof(it)];
  1331. };
  1332.  
  1333. /***/ },
  1334. /* 33 */
  1335. /***/ function(module, exports, __webpack_require__) {
  1336.  
  1337. // getting tag from 19.1.3.6 Object.prototype.toString()
  1338. var cof = __webpack_require__(34)
  1339. , TAG = __webpack_require__(27)('toStringTag')
  1340. // ES3 wrong here
  1341. , ARG = cof(function(){ return arguments; }()) == 'Arguments';
  1342.  
  1343. // fallback for IE11 Script Access Denied error
  1344. var tryGet = function(it, key){
  1345. try {
  1346. return it[key];
  1347. } catch(e){ /* empty */ }
  1348. };
  1349.  
  1350. module.exports = function(it){
  1351. var O, T, B;
  1352. return it === undefined ? 'Undefined' : it === null ? 'Null'
  1353. // @@toStringTag case
  1354. : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
  1355. // builtinTag case
  1356. : ARG ? cof(O)
  1357. // ES3 arguments fallback
  1358. : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
  1359. };
  1360.  
  1361. /***/ },
  1362. /* 34 */
  1363. /***/ function(module, exports) {
  1364.  
  1365. var toString = {}.toString;
  1366.  
  1367. module.exports = function(it){
  1368. return toString.call(it).slice(8, -1);
  1369. };
  1370.  
  1371. /***/ },
  1372. /* 35 */
  1373. /***/ function(module, exports, __webpack_require__) {
  1374.  
  1375. var ITERATOR = __webpack_require__(27)('iterator')
  1376. , SAFE_CLOSING = false;
  1377.  
  1378. try {
  1379. var riter = [7][ITERATOR]();
  1380. riter['return'] = function(){ SAFE_CLOSING = true; };
  1381. Array.from(riter, function(){ throw 2; });
  1382. } catch(e){ /* empty */ }
  1383.  
  1384. module.exports = function(exec, skipClosing){
  1385. if(!skipClosing && !SAFE_CLOSING)return false;
  1386. var safe = false;
  1387. try {
  1388. var arr = [7]
  1389. , iter = arr[ITERATOR]();
  1390. iter.next = function(){ return {done: safe = true}; };
  1391. arr[ITERATOR] = function(){ return iter; };
  1392. exec(arr);
  1393. } catch(e){ /* empty */ }
  1394. return safe;
  1395. };
  1396.  
  1397. /***/ },
  1398. /* 36 */
  1399. /***/ function(module, exports, __webpack_require__) {
  1400.  
  1401. // 19.1.3.1 Object.assign(target, source)
  1402. var $export = __webpack_require__(6);
  1403.  
  1404. $export($export.S + $export.F, 'Object', {assign: __webpack_require__(37)});
  1405.  
  1406. /***/ },
  1407. /* 37 */
  1408. /***/ function(module, exports, __webpack_require__) {
  1409.  
  1410. 'use strict';
  1411. // 19.1.2.1 Object.assign(target, source, ...)
  1412. var getKeys = __webpack_require__(38)
  1413. , gOPS = __webpack_require__(46)
  1414. , pIE = __webpack_require__(47)
  1415. , toObject = __webpack_require__(22)
  1416. , IObject = __webpack_require__(41)
  1417. , $assign = Object.assign;
  1418.  
  1419. // should work with symbols and should have deterministic property order (V8 bug)
  1420. module.exports = !$assign || __webpack_require__(15)(function(){
  1421. var A = {}
  1422. , B = {}
  1423. , S = Symbol()
  1424. , K = 'abcdefghijklmnopqrst';
  1425. A[S] = 7;
  1426. K.split('').forEach(function(k){ B[k] = k; });
  1427. return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
  1428. }) ? function assign(target, source){ // eslint-disable-line no-unused-vars
  1429. var T = toObject(target)
  1430. , aLen = arguments.length
  1431. , index = 1
  1432. , getSymbols = gOPS.f
  1433. , isEnum = pIE.f;
  1434. while(aLen > index){
  1435. var S = IObject(arguments[index++])
  1436. , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)
  1437. , length = keys.length
  1438. , j = 0
  1439. , key;
  1440. while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];
  1441. } return T;
  1442. } : $assign;
  1443.  
  1444. /***/ },
  1445. /* 38 */
  1446. /***/ function(module, exports, __webpack_require__) {
  1447.  
  1448. // 19.1.2.14 / 15.2.3.14 Object.keys(O)
  1449. var $keys = __webpack_require__(39)
  1450. , enumBugKeys = __webpack_require__(45);
  1451.  
  1452. module.exports = Object.keys || function keys(O){
  1453. return $keys(O, enumBugKeys);
  1454. };
  1455.  
  1456. /***/ },
  1457. /* 39 */
  1458. /***/ function(module, exports, __webpack_require__) {
  1459.  
  1460. var has = __webpack_require__(20)
  1461. , toIObject = __webpack_require__(40)
  1462. , arrayIndexOf = __webpack_require__(42)(false)
  1463. , IE_PROTO = __webpack_require__(44)('IE_PROTO');
  1464.  
  1465. module.exports = function(object, names){
  1466. var O = toIObject(object)
  1467. , i = 0
  1468. , result = []
  1469. , key;
  1470. for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
  1471. // Don't enum bug & hidden keys
  1472. while(names.length > i)if(has(O, key = names[i++])){
  1473. ~arrayIndexOf(result, key) || result.push(key);
  1474. }
  1475. return result;
  1476. };
  1477.  
  1478. /***/ },
  1479. /* 40 */
  1480. /***/ function(module, exports, __webpack_require__) {
  1481.  
  1482. // to indexed object, toObject with fallback for non-array-like ES3 strings
  1483. var IObject = __webpack_require__(41)
  1484. , defined = __webpack_require__(23);
  1485. module.exports = function(it){
  1486. return IObject(defined(it));
  1487. };
  1488.  
  1489. /***/ },
  1490. /* 41 */
  1491. /***/ function(module, exports, __webpack_require__) {
  1492.  
  1493. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  1494. var cof = __webpack_require__(34);
  1495. module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
  1496. return cof(it) == 'String' ? it.split('') : Object(it);
  1497. };
  1498.  
  1499. /***/ },
  1500. /* 42 */
  1501. /***/ function(module, exports, __webpack_require__) {
  1502.  
  1503. // false -> Array#indexOf
  1504. // true -> Array#includes
  1505. var toIObject = __webpack_require__(40)
  1506. , toLength = __webpack_require__(29)
  1507. , toIndex = __webpack_require__(43);
  1508. module.exports = function(IS_INCLUDES){
  1509. return function($this, el, fromIndex){
  1510. var O = toIObject($this)
  1511. , length = toLength(O.length)
  1512. , index = toIndex(fromIndex, length)
  1513. , value;
  1514. // Array#includes uses SameValueZero equality algorithm
  1515. if(IS_INCLUDES && el != el)while(length > index){
  1516. value = O[index++];
  1517. if(value != value)return true;
  1518. // Array#toIndex ignores holes, Array#includes - not
  1519. } else for(;length > index; index++)if(IS_INCLUDES || index in O){
  1520. if(O[index] === el)return IS_INCLUDES || index || 0;
  1521. } return !IS_INCLUDES && -1;
  1522. };
  1523. };
  1524.  
  1525. /***/ },
  1526. /* 43 */
  1527. /***/ function(module, exports, __webpack_require__) {
  1528.  
  1529. var toInteger = __webpack_require__(30)
  1530. , max = Math.max
  1531. , min = Math.min;
  1532. module.exports = function(index, length){
  1533. index = toInteger(index);
  1534. return index < 0 ? max(index + length, 0) : min(index, length);
  1535. };
  1536.  
  1537. /***/ },
  1538. /* 44 */
  1539. /***/ function(module, exports, __webpack_require__) {
  1540.  
  1541. var shared = __webpack_require__(28)('keys')
  1542. , uid = __webpack_require__(21);
  1543. module.exports = function(key){
  1544. return shared[key] || (shared[key] = uid(key));
  1545. };
  1546.  
  1547. /***/ },
  1548. /* 45 */
  1549. /***/ function(module, exports) {
  1550.  
  1551. // IE 8- don't enum bug keys
  1552. module.exports = (
  1553. 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
  1554. ).split(',');
  1555.  
  1556. /***/ },
  1557. /* 46 */
  1558. /***/ function(module, exports) {
  1559.  
  1560. exports.f = Object.getOwnPropertySymbols;
  1561.  
  1562. /***/ },
  1563. /* 47 */
  1564. /***/ function(module, exports) {
  1565.  
  1566. exports.f = {}.propertyIsEnumerable;
  1567.  
  1568. /***/ },
  1569. /* 48 */
  1570. /***/ function(module, exports, __webpack_require__) {
  1571.  
  1572. 'use strict';
  1573.  
  1574. Object.defineProperty(exports, "__esModule", {
  1575. value: true
  1576. });
  1577.  
  1578. exports.default = function () {
  1579. GM_addStyle('\n /** 公共部分 **/\n @font-face { \n font-family: ifont;\n src: url("http://at.alicdn.com/t/font_1442373896_4754455.eot?#iefix") format("embedded-opentype"), url("http://at.alicdn.com/t/font_1442373896_4754455.woff") format("woff"), url("http://at.alicdn.com/t/font_1442373896_4754455.ttf") format("truetype"), url("http://at.alicdn.com/t/font_1442373896_4754455.svg#ifont") format("svg");\n }\n ' + ('#' + _config.MaskID) + '{\n position: fixed;\n top: 0;\n left: 0;\n z-index: 9999999;\n width:100%;\n height:100%;\n background: rgba(45, 45, 45, 0.6);\n margin: 0;\n padding: 0;\n overflow: hidden;\n font-size:14px;\n line-height:1.42857143em;\n }\n \n ' + ('#' + _config.MaskID) + ' *{\n -webkit-box-sizing:border-box;\n box-sizing:border-box;\n }\n \n ' + ('#' + _config.MaskID) + ' label{\n display:inline-block;\n max-width:100%;\n margin-bottom:5px;\n font-weight:700;\n }\n \n ' + ('#' + _config.MaskID) + ' .btn{\n display:inline-block;\n padding:6px 12px;\n font-size:14px;\n line-height:1.42857143;\n text-align:center;\n white-space:nowrap;\n vertical-align:middle;\n -ms-touch-action:manipulation;\n touch-action:manipulation;\n cursor:pointer;\n -webkit-user-select:none;\n -moz-user-select:none;\n user-select:none;\n background-image:none;\n border:1px solid transparent;\n border-radius:4px;\n margin-top:5px;\n margin-bottom:5px;\n color:#333;\n background-color:#fff;\n border-color:#333;\n }\n \n ' + ('#' + _config.MaskID) + ' .form-group{\n margin-bottom:15px;\n }\n \n ' + ('#' + _config.MaskID) + ' .form-control{\n display:block;\n width:100%;\n height:34px;\n padding:6px 12px;\n font-size:14px;\n line-height:1.42857143;\n color:#555;\n background-color:#fff;\n background-image:none;\n border:1px solid #ccc;\n border-radius:4px;\n -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);\n box-shadow:inset 0 1px 1px rgba(0,0,0,.075);\n -webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;\n transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;\n }\n \n ' + ('#' + _config.MaskID) + ' .form-control:focus{\n border-color:#66afe9;\n outline:0;\n -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);\n box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);\n }\n \n ' + ('#' + _config.MaskID) + ' p{\n color:#fff;\n line-height:3em;\n }\n \n ' + ('#' + _config.MaskID) + ' a{\n color:#555;\n text-decoration:none;\n }\n \n ' + ('#' + _config.MaskID) + ' .block-clear{\n visibility:hidden;\n font-size:0;\n width:0;\n height:0;\n clear:both;\n }\n ' + ('#' + _config.MaskID) + ' ul{\n list-style:none;\n }\n ' + ('#' + _config.MaskID) + ' ul li{\n color:#555;\n }\n \n \n /** 非公共部分 **/\n ' + ('#' + _config.PanelID) + '{\n position: relative;\n top: 100px;\n width: 800px;\n height: auto;\n margin: 0 auto;\n background: #fff;\n z-index: inherit;\n }\n \n ' + ('#' + _config.PanelID) + ' .block-title{\n text-align:center;\n line-height:36px;\n font-size: 1.6em;\n border-bottom:1px solid #ccc;\n }\n \n ' + ('#' + _config.PanelID) + ' .block-container{\n margin-top:10px;\n padding-bottom:10px;\n }\n \n ' + ('#' + _config.PanelID) + ' .block-menu{\n width:10%;\n float:left;\n }\n \n ' + ('#' + _config.PanelID) + ' .block-menu ul{\n text-align:center;\n }\n \n ' + ('#' + _config.PanelID) + ' .block-menu ul li{\n line-height:4em;\n cursor:pointer;\n }\n \n \n ' + ('#' + _config.PanelID) + ' .block-menu ul li.active{\n background:#6B6B6B;\n color:#fff;\n }\n \n ' + ('#' + _config.PanelID) + ' .block-content{\n width:90%;\n padding-left:20px;\n float:left;\n max-height:400px;\n overflow-y:auto;\n }\n \n ' + ('#' + _config.PanelID) + ' .block-content .block-list table{\n width:100%;\n }\n \n ' + ('#' + _config.PanelID) + ' .block-content .block-list table tr{\n text-align:center;\n line-height:24px;\n }\n \n ');
  1580. };
  1581.  
  1582. var _config = __webpack_require__(49);
  1583.  
  1584. /***/ },
  1585. /* 49 */
  1586. /***/ function(module, exports) {
  1587.  
  1588. 'use strict';
  1589.  
  1590. Object.defineProperty(exports, "__esModule", {
  1591. value: true
  1592. });
  1593. /**
  1594. * Created by axetroy on 5/8/16.
  1595. */
  1596.  
  1597. var MaskID = 'block-mask';
  1598. var PanelID = 'block-panel';
  1599. var Active = 'active';
  1600.  
  1601. exports.MaskID = MaskID;
  1602. exports.PanelID = PanelID;
  1603. exports.Active = Active;
  1604.  
  1605. /***/ },
  1606. /* 50 */
  1607. /***/ function(module, exports) {
  1608.  
  1609. "use strict";
  1610.  
  1611. Object.defineProperty(exports, "__esModule", {
  1612. value: true
  1613. });
  1614. /**
  1615. * Created by axetroy on 5/8/16.
  1616. */
  1617.  
  1618. var svg = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"20\" height=\"20\" viewBox=\"0 0 200 200\" version=\"1.1\" style=\"\n vertical-align: middle;\n\">\n<g class=\"transform-group\">\n <g transform=\"scale(0.1953125, 0.1953125)\">\n <path d=\"M822.809088 510.318592q0-91.994112-49.711104-168.56064l-430.829568 430.258176q78.280704 50.853888 169.703424 50.853888 63.424512 0 120.849408-24.855552t99.136512-66.567168 66.281472-99.707904 24.569856-121.4208zm-570.820608 170.846208l431.40096-430.829568q-77.13792-51.996672-171.4176-51.996672-84.566016 0-155.990016 41.711616t-113.135616 113.707008-41.711616 156.561408q0 92.565504 50.853888 170.846208zm698.812416-170.846208q0 89.708544-34.854912 171.4176t-93.422592 140.562432-139.99104 93.708288-170.560512 34.854912-170.560512-34.854912-139.99104-93.708288-93.422592-140.562432-34.854912-171.4176 34.854912-171.131904 93.422592-140.276736 139.99104-93.708288 170.560512-34.854912 170.560512 34.854912 139.99104 93.708288 93.422592 140.276736 34.854912 171.131904z\" fill=\"#272636\"></path>\n </g>\n </g>\n</svg>\n";
  1619.  
  1620. exports.default = svg;
  1621.  
  1622. /***/ }
  1623. /******/ ]);