CSGO饰品2D/3D对比

使用图像处理技术对CSGO饰品网站上的皮肤进行对比,可以快速分辨出饰品细微的差异,不用再手动来回切换对比了。同时显示饰品上架时间和修改时间。

  1. // ==UserScript==
  2. // @name CSGO饰品2D/3D对比
  3. // @namespace https://github.com/qianjiachun
  4. // @version 2024.05.31.02
  5. // @description 使用图像处理技术对CSGO饰品网站上的皮肤进行对比,可以快速分辨出饰品细微的差异,不用再手动来回切换对比了。同时显示饰品上架时间和修改时间。
  6. // @author 小淳
  7. // @match *://buff.163.com/goods*
  8. // @match *://buff.163.com/3d_inspect/cs2?compare=true*
  9. // @match *://spect.fp.ps.netease.com/*
  10. // @match *://buff.163.com/compare3d*
  11. // @grant GM_setValue
  12. // @grant GM_getValue
  13. // @grant GM_deleteValue
  14. // @grant GM_listValues
  15. // @grant GM_setClipboard
  16. // @grant unsafeWindow
  17. // @run-at document-start
  18. // @require https://fastly.jsdelivr.net/npm/notice.js@0.4.0/dist/notice.js
  19. // @require https://lib.baomitu.com/vue/3.0.11/vue.global.prod.js
  20. // @require https://fastly.jsdelivr.net/npm/comparison-slider@1.1.0/dist/comparison-slider.min.js
  21. // @require https://fastly.jsdelivr.net/npm/canvas-compare@3.0.0/src/canvas-compare.min.js
  22. // @require https://fastly.jsdelivr.net/npm/@vueform/slider@2.0.4/dist/slider.global.js
  23. // ==/UserScript==
  24.  
  25. unsafeWindow.hookList = [];
  26. unsafeWindow.hookCallback = function (xhr) {
  27. // console.log(xhr);
  28. }
  29. function addXMLRequestCallback(callback){
  30. var oldSend, i;
  31. if( XMLHttpRequest.callbacks ) {
  32. XMLHttpRequest.callbacks.push( callback );
  33. } else {
  34. XMLHttpRequest.callbacks = [callback];
  35. oldSend = XMLHttpRequest.prototype.send;
  36. XMLHttpRequest.prototype.send = function(){
  37. for( i = 0; i < XMLHttpRequest.callbacks.length; i++ ) {
  38. XMLHttpRequest.callbacks[i]( this );
  39. }
  40. oldSend.apply(this, arguments);
  41. }
  42. }
  43. }
  44. if (location.href.indexOf("goods") !== -1) {
  45. addXMLRequestCallback( function( xhr ) {
  46. xhr.addEventListener("load", function(){
  47. if ( xhr.readyState == 4 && xhr.status == 200 ) {
  48. unsafeWindow.hookList.push(xhr);
  49. unsafeWindow.hookCallback(xhr);
  50. }
  51. });
  52. });
  53. }
  54. /******/ (function(modules) { // webpackBootstrap
  55. /******/ // The module cache
  56. /******/ var installedModules = {};
  57. /******/
  58. /******/ // The require function
  59. /******/ function __webpack_require__(moduleId) {
  60. /******/
  61. /******/ // Check if module is in cache
  62. /******/ if(installedModules[moduleId]) {
  63. /******/ return installedModules[moduleId].exports;
  64. /******/ }
  65. /******/ // Create a new module (and put it into the cache)
  66. /******/ var module = installedModules[moduleId] = {
  67. /******/ i: moduleId,
  68. /******/ l: false,
  69. /******/ exports: {}
  70. /******/ };
  71. /******/
  72. /******/ // Execute the module function
  73. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  74. /******/
  75. /******/ // Flag the module as loaded
  76. /******/ module.l = true;
  77. /******/
  78. /******/ // Return the exports of the module
  79. /******/ return module.exports;
  80. /******/ }
  81. /******/
  82. /******/
  83. /******/ // expose the modules object (__webpack_modules__)
  84. /******/ __webpack_require__.m = modules;
  85. /******/
  86. /******/ // expose the module cache
  87. /******/ __webpack_require__.c = installedModules;
  88. /******/
  89. /******/ // define getter function for harmony exports
  90. /******/ __webpack_require__.d = function(exports, name, getter) {
  91. /******/ if(!__webpack_require__.o(exports, name)) {
  92. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  93. /******/ }
  94. /******/ };
  95. /******/
  96. /******/ // define __esModule on exports
  97. /******/ __webpack_require__.r = function(exports) {
  98. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  99. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  100. /******/ }
  101. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  102. /******/ };
  103. /******/
  104. /******/ // create a fake namespace object
  105. /******/ // mode & 1: value is a module id, require it
  106. /******/ // mode & 2: merge all properties of value into the ns
  107. /******/ // mode & 4: return value when already ns object
  108. /******/ // mode & 8|1: behave like require
  109. /******/ __webpack_require__.t = function(value, mode) {
  110. /******/ if(mode & 1) value = __webpack_require__(value);
  111. /******/ if(mode & 8) return value;
  112. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  113. /******/ var ns = Object.create(null);
  114. /******/ __webpack_require__.r(ns);
  115. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  116. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  117. /******/ return ns;
  118. /******/ };
  119. /******/
  120. /******/ // getDefaultExport function for compatibility with non-harmony modules
  121. /******/ __webpack_require__.n = function(module) {
  122. /******/ var getter = module && module.__esModule ?
  123. /******/ function getDefault() { return module['default']; } :
  124. /******/ function getModuleExports() { return module; };
  125. /******/ __webpack_require__.d(getter, 'a', getter);
  126. /******/ return getter;
  127. /******/ };
  128. /******/
  129. /******/ // Object.prototype.hasOwnProperty.call
  130. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  131. /******/
  132. /******/ // __webpack_public_path__
  133. /******/ __webpack_require__.p = "/dist/";
  134. /******/
  135. /******/
  136. /******/ // Load entry module and return exports
  137. /******/ return __webpack_require__(__webpack_require__.s = 31);
  138. /******/ })
  139. /************************************************************************/
  140. /******/ ([
  141. /* 0 */
  142. /***/ (function(module, exports) {
  143.  
  144. module.exports = Vue;
  145.  
  146. /***/ }),
  147. /* 1 */
  148. /***/ (function(module, exports, __webpack_require__) {
  149.  
  150. "use strict";
  151.  
  152.  
  153. var isOldIE = function isOldIE() {
  154. var memo;
  155. return function memorize() {
  156. if (typeof memo === 'undefined') {
  157. // Test for IE <= 9 as proposed by Browserhacks
  158. // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
  159. // Tests for existence of standard globals is to allow style-loader
  160. // to operate correctly into non-standard environments
  161. // @see https://github.com/webpack-contrib/style-loader/issues/177
  162. memo = Boolean(window && document && document.all && !window.atob);
  163. }
  164.  
  165. return memo;
  166. };
  167. }();
  168.  
  169. var getTarget = function getTarget() {
  170. var memo = {};
  171. return function memorize(target) {
  172. if (typeof memo[target] === 'undefined') {
  173. var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself
  174.  
  175. if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
  176. try {
  177. // This will throw an exception if access to iframe is blocked
  178. // due to cross-origin restrictions
  179. styleTarget = styleTarget.contentDocument.head;
  180. } catch (e) {
  181. // istanbul ignore next
  182. styleTarget = null;
  183. }
  184. }
  185.  
  186. memo[target] = styleTarget;
  187. }
  188.  
  189. return memo[target];
  190. };
  191. }();
  192.  
  193. var stylesInDom = [];
  194.  
  195. function getIndexByIdentifier(identifier) {
  196. var result = -1;
  197.  
  198. for (var i = 0; i < stylesInDom.length; i++) {
  199. if (stylesInDom[i].identifier === identifier) {
  200. result = i;
  201. break;
  202. }
  203. }
  204.  
  205. return result;
  206. }
  207.  
  208. function modulesToDom(list, options) {
  209. var idCountMap = {};
  210. var identifiers = [];
  211.  
  212. for (var i = 0; i < list.length; i++) {
  213. var item = list[i];
  214. var id = options.base ? item[0] + options.base : item[0];
  215. var count = idCountMap[id] || 0;
  216. var identifier = "".concat(id, " ").concat(count);
  217. idCountMap[id] = count + 1;
  218. var index = getIndexByIdentifier(identifier);
  219. var obj = {
  220. css: item[1],
  221. media: item[2],
  222. sourceMap: item[3]
  223. };
  224.  
  225. if (index !== -1) {
  226. stylesInDom[index].references++;
  227. stylesInDom[index].updater(obj);
  228. } else {
  229. stylesInDom.push({
  230. identifier: identifier,
  231. updater: addStyle(obj, options),
  232. references: 1
  233. });
  234. }
  235.  
  236. identifiers.push(identifier);
  237. }
  238.  
  239. return identifiers;
  240. }
  241.  
  242. function insertStyleElement(options) {
  243. var style = document.createElement('style');
  244. var attributes = options.attributes || {};
  245.  
  246. if (typeof attributes.nonce === 'undefined') {
  247. var nonce = true ? __webpack_require__.nc : undefined;
  248.  
  249. if (nonce) {
  250. attributes.nonce = nonce;
  251. }
  252. }
  253.  
  254. Object.keys(attributes).forEach(function (key) {
  255. style.setAttribute(key, attributes[key]);
  256. });
  257.  
  258. if (typeof options.insert === 'function') {
  259. options.insert(style);
  260. } else {
  261. var target = getTarget(options.insert || 'head');
  262.  
  263. if (!target) {
  264. throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
  265. }
  266.  
  267. target.appendChild(style);
  268. }
  269.  
  270. return style;
  271. }
  272.  
  273. function removeStyleElement(style) {
  274. // istanbul ignore if
  275. if (style.parentNode === null) {
  276. return false;
  277. }
  278.  
  279. style.parentNode.removeChild(style);
  280. }
  281. /* istanbul ignore next */
  282.  
  283.  
  284. var replaceText = function replaceText() {
  285. var textStore = [];
  286. return function replace(index, replacement) {
  287. textStore[index] = replacement;
  288. return textStore.filter(Boolean).join('\n');
  289. };
  290. }();
  291.  
  292. function applyToSingletonTag(style, index, remove, obj) {
  293. var css = remove ? '' : obj.media ? "@media ".concat(obj.media, " {").concat(obj.css, "}") : obj.css; // For old IE
  294.  
  295. /* istanbul ignore if */
  296.  
  297. if (style.styleSheet) {
  298. style.styleSheet.cssText = replaceText(index, css);
  299. } else {
  300. var cssNode = document.createTextNode(css);
  301. var childNodes = style.childNodes;
  302.  
  303. if (childNodes[index]) {
  304. style.removeChild(childNodes[index]);
  305. }
  306.  
  307. if (childNodes.length) {
  308. style.insertBefore(cssNode, childNodes[index]);
  309. } else {
  310. style.appendChild(cssNode);
  311. }
  312. }
  313. }
  314.  
  315. function applyToTag(style, options, obj) {
  316. var css = obj.css;
  317. var media = obj.media;
  318. var sourceMap = obj.sourceMap;
  319.  
  320. if (media) {
  321. style.setAttribute('media', media);
  322. } else {
  323. style.removeAttribute('media');
  324. }
  325.  
  326. if (sourceMap && btoa) {
  327. css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
  328. } // For old IE
  329.  
  330. /* istanbul ignore if */
  331.  
  332.  
  333. if (style.styleSheet) {
  334. style.styleSheet.cssText = css;
  335. } else {
  336. while (style.firstChild) {
  337. style.removeChild(style.firstChild);
  338. }
  339.  
  340. style.appendChild(document.createTextNode(css));
  341. }
  342. }
  343.  
  344. var singleton = null;
  345. var singletonCounter = 0;
  346.  
  347. function addStyle(obj, options) {
  348. var style;
  349. var update;
  350. var remove;
  351.  
  352. if (options.singleton) {
  353. var styleIndex = singletonCounter++;
  354. style = singleton || (singleton = insertStyleElement(options));
  355. update = applyToSingletonTag.bind(null, style, styleIndex, false);
  356. remove = applyToSingletonTag.bind(null, style, styleIndex, true);
  357. } else {
  358. style = insertStyleElement(options);
  359. update = applyToTag.bind(null, style, options);
  360.  
  361. remove = function remove() {
  362. removeStyleElement(style);
  363. };
  364. }
  365.  
  366. update(obj);
  367. return function updateStyle(newObj) {
  368. if (newObj) {
  369. if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {
  370. return;
  371. }
  372.  
  373. update(obj = newObj);
  374. } else {
  375. remove();
  376. }
  377. };
  378. }
  379.  
  380. module.exports = function (list, options) {
  381. options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
  382. // tags it will allow on a page
  383.  
  384. if (!options.singleton && typeof options.singleton !== 'boolean') {
  385. options.singleton = isOldIE();
  386. }
  387.  
  388. list = list || [];
  389. var lastIdentifiers = modulesToDom(list, options);
  390. return function update(newList) {
  391. newList = newList || [];
  392.  
  393. if (Object.prototype.toString.call(newList) !== '[object Array]') {
  394. return;
  395. }
  396.  
  397. for (var i = 0; i < lastIdentifiers.length; i++) {
  398. var identifier = lastIdentifiers[i];
  399. var index = getIndexByIdentifier(identifier);
  400. stylesInDom[index].references--;
  401. }
  402.  
  403. var newLastIdentifiers = modulesToDom(newList, options);
  404.  
  405. for (var _i = 0; _i < lastIdentifiers.length; _i++) {
  406. var _identifier = lastIdentifiers[_i];
  407.  
  408. var _index = getIndexByIdentifier(_identifier);
  409.  
  410. if (stylesInDom[_index].references === 0) {
  411. stylesInDom[_index].updater();
  412.  
  413. stylesInDom.splice(_index, 1);
  414. }
  415. }
  416.  
  417. lastIdentifiers = newLastIdentifiers;
  418. };
  419. };
  420.  
  421. /***/ }),
  422. /* 2 */
  423. /***/ (function(module, exports, __webpack_require__) {
  424.  
  425. "use strict";
  426.  
  427.  
  428. /*
  429. MIT License http://www.opensource.org/licenses/mit-license.php
  430. Author Tobias Koppers @sokra
  431. */
  432. // css base code, injected by the css-loader
  433. // eslint-disable-next-line func-names
  434. module.exports = function (useSourceMap) {
  435. var list = []; // return the list of modules as css string
  436.  
  437. list.toString = function toString() {
  438. return this.map(function (item) {
  439. var content = cssWithMappingToString(item, useSourceMap);
  440.  
  441. if (item[2]) {
  442. return "@media ".concat(item[2], " {").concat(content, "}");
  443. }
  444.  
  445. return content;
  446. }).join('');
  447. }; // import a list of modules into the list
  448. // eslint-disable-next-line func-names
  449.  
  450.  
  451. list.i = function (modules, mediaQuery, dedupe) {
  452. if (typeof modules === 'string') {
  453. // eslint-disable-next-line no-param-reassign
  454. modules = [[null, modules, '']];
  455. }
  456.  
  457. var alreadyImportedModules = {};
  458.  
  459. if (dedupe) {
  460. for (var i = 0; i < this.length; i++) {
  461. // eslint-disable-next-line prefer-destructuring
  462. var id = this[i][0];
  463.  
  464. if (id != null) {
  465. alreadyImportedModules[id] = true;
  466. }
  467. }
  468. }
  469.  
  470. for (var _i = 0; _i < modules.length; _i++) {
  471. var item = [].concat(modules[_i]);
  472.  
  473. if (dedupe && alreadyImportedModules[item[0]]) {
  474. // eslint-disable-next-line no-continue
  475. continue;
  476. }
  477.  
  478. if (mediaQuery) {
  479. if (!item[2]) {
  480. item[2] = mediaQuery;
  481. } else {
  482. item[2] = "".concat(mediaQuery, " and ").concat(item[2]);
  483. }
  484. }
  485.  
  486. list.push(item);
  487. }
  488. };
  489.  
  490. return list;
  491. };
  492.  
  493. function cssWithMappingToString(item, useSourceMap) {
  494. var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring
  495.  
  496. var cssMapping = item[3];
  497.  
  498. if (!cssMapping) {
  499. return content;
  500. }
  501.  
  502. if (useSourceMap && typeof btoa === 'function') {
  503. var sourceMapping = toComment(cssMapping);
  504. var sourceURLs = cssMapping.sources.map(function (source) {
  505. return "/*# sourceURL=".concat(cssMapping.sourceRoot || '').concat(source, " */");
  506. });
  507. return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
  508. }
  509.  
  510. return [content].join('\n');
  511. } // Adapted from convert-source-map (MIT)
  512.  
  513.  
  514. function toComment(sourceMap) {
  515. // eslint-disable-next-line no-undef
  516. var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
  517. var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
  518. return "/*# ".concat(data, " */");
  519. }
  520.  
  521. /***/ }),
  522. /* 3 */
  523. /***/ (function(module, exports) {
  524.  
  525. module.exports = VueformSlider;
  526.  
  527. /***/ }),
  528. /* 4 */
  529. /***/ (function(module, exports, __webpack_require__) {
  530.  
  531. var api = __webpack_require__(1);
  532. var content = __webpack_require__(14);
  533.  
  534. content = content.__esModule ? content.default : content;
  535.  
  536. if (typeof content === 'string') {
  537. content = [[module.i, content, '']];
  538. }
  539.  
  540. var options = {};
  541.  
  542. options.insert = "head";
  543. options.singleton = false;
  544.  
  545. var update = api(content, options);
  546.  
  547.  
  548.  
  549. module.exports = content.locals || {};
  550.  
  551. /***/ }),
  552. /* 5 */
  553. /***/ (function(module, exports, __webpack_require__) {
  554.  
  555. var api = __webpack_require__(1);
  556. var content = __webpack_require__(16);
  557.  
  558. content = content.__esModule ? content.default : content;
  559.  
  560. if (typeof content === 'string') {
  561. content = [[module.i, content, '']];
  562. }
  563.  
  564. var options = {};
  565.  
  566. options.insert = "head";
  567. options.singleton = false;
  568.  
  569. var update = api(content, options);
  570.  
  571.  
  572.  
  573. module.exports = content.locals || {};
  574.  
  575. /***/ }),
  576. /* 6 */
  577. /***/ (function(module, exports, __webpack_require__) {
  578.  
  579. var api = __webpack_require__(1);
  580. var content = __webpack_require__(26);
  581.  
  582. content = content.__esModule ? content.default : content;
  583.  
  584. if (typeof content === 'string') {
  585. content = [[module.i, content, '']];
  586. }
  587.  
  588. var options = {};
  589.  
  590. options.insert = "head";
  591. options.singleton = false;
  592.  
  593. var update = api(content, options);
  594.  
  595.  
  596.  
  597. module.exports = content.locals || {};
  598.  
  599. /***/ }),
  600. /* 7 */
  601. /***/ (function(module, exports, __webpack_require__) {
  602.  
  603. var api = __webpack_require__(1);
  604. var content = __webpack_require__(28);
  605.  
  606. content = content.__esModule ? content.default : content;
  607.  
  608. if (typeof content === 'string') {
  609. content = [[module.i, content, '']];
  610. }
  611.  
  612. var options = {};
  613.  
  614. options.insert = "head";
  615. options.singleton = false;
  616.  
  617. var update = api(content, options);
  618.  
  619.  
  620.  
  621. module.exports = content.locals || {};
  622.  
  623. /***/ }),
  624. /* 8 */
  625. /***/ (function(module, exports, __webpack_require__) {
  626.  
  627. var api = __webpack_require__(1);
  628. var content = __webpack_require__(30);
  629.  
  630. content = content.__esModule ? content.default : content;
  631.  
  632. if (typeof content === 'string') {
  633. content = [[module.i, content, '']];
  634. }
  635.  
  636. var options = {};
  637.  
  638. options.insert = "head";
  639. options.singleton = false;
  640.  
  641. var update = api(content, options);
  642.  
  643.  
  644.  
  645. module.exports = content.locals || {};
  646.  
  647. /***/ }),
  648. /* 9 */
  649. /***/ (function(module, exports, __webpack_require__) {
  650.  
  651. var api = __webpack_require__(1);
  652. var content = __webpack_require__(10);
  653.  
  654. content = content.__esModule ? content.default : content;
  655.  
  656. if (typeof content === 'string') {
  657. content = [[module.i, content, '']];
  658. }
  659.  
  660. var options = {};
  661.  
  662. options.insert = "head";
  663. options.singleton = false;
  664.  
  665. var update = api(content, options);
  666.  
  667.  
  668.  
  669. module.exports = content.locals || {};
  670.  
  671. /***/ }),
  672. /* 10 */
  673. /***/ (function(module, exports, __webpack_require__) {
  674.  
  675. // Imports
  676. var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(2);
  677. exports = ___CSS_LOADER_API_IMPORT___(false);
  678. // Module
  679. exports.push([module.i, ".noticejs-top{top:0;width:100%!important}.noticejs-top .item{border-radius:0!important;margin:0!important}.noticejs-topRight{top:10px;right:10px}.noticejs-topLeft{top:10px;left:10px}.noticejs-topCenter{top:10px;left:50%;transform:translate(-50%)}.noticejs-middleLeft,.noticejs-middleRight{right:10px;top:50%;transform:translateY(-50%)}.noticejs-middleLeft{left:10px}.noticejs-middleCenter{top:50%;left:50%;transform:translate(-50%,-50%)}.noticejs-bottom{bottom:0;width:100%!important}.noticejs-bottom .item{border-radius:0!important;margin:0!important}.noticejs-bottomRight{bottom:10px;right:10px}.noticejs-bottomLeft{bottom:10px;left:10px}.noticejs-bottomCenter{bottom:10px;left:50%;transform:translate(-50%)}.noticejs{font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.noticejs .item{margin:0 0 10px;border-radius:3px;overflow:hidden}.noticejs .item .close{float:right;font-size:18px;font-weight:700;line-height:1;color:#fff;text-shadow:0 1px 0 #fff;opacity:1;margin-right:7px}.noticejs .item .close:hover{opacity:.5;color:#000}.noticejs .item a{color:#fff;border-bottom:1px dashed #fff}.noticejs .item a,.noticejs .item a:hover{text-decoration:none}.noticejs .success{background-color:#64ce83}.noticejs .success .noticejs-heading{background-color:#3da95c;color:#fff;padding:10px}.noticejs .success .noticejs-body{color:#fff;padding:10px}.noticejs .success .noticejs-body:hover{visibility:visible!important}.noticejs .success .noticejs-content{visibility:visible}.noticejs .info{background-color:#3ea2ff}.noticejs .info .noticejs-heading{background-color:#067cea;color:#fff;padding:10px}.noticejs .info .noticejs-body{color:#fff;padding:10px}.noticejs .info .noticejs-body:hover{visibility:visible!important}.noticejs .info .noticejs-content{visibility:visible}.noticejs .warning{background-color:#ff7f48}.noticejs .warning .noticejs-heading{background-color:#f44e06;color:#fff;padding:10px}.noticejs .warning .noticejs-body{color:#fff;padding:10px}.noticejs .warning .noticejs-body:hover{visibility:visible!important}.noticejs .warning .noticejs-content{visibility:visible}.noticejs .error{background-color:#e74c3c}.noticejs .error .noticejs-heading{background-color:#ba2c1d;color:#fff;padding:10px}.noticejs .error .noticejs-body{color:#fff;padding:10px}.noticejs .error .noticejs-body:hover{visibility:visible!important}.noticejs .error .noticejs-content{visibility:visible}.noticejs .progressbar{width:100%}.noticejs .progressbar .bar{width:1%;height:30px;background-color:#4caf50}.noticejs .success .noticejs-progressbar{width:100%;background-color:#64ce83;margin-top:-1px}.noticejs .success .noticejs-progressbar .noticejs-bar{width:100%;height:5px;background:#3da95c}.noticejs .info .noticejs-progressbar{width:100%;background-color:#3ea2ff;margin-top:-1px}.noticejs .info .noticejs-progressbar .noticejs-bar{width:100%;height:5px;background:#067cea}.noticejs .warning .noticejs-progressbar{width:100%;background-color:#ff7f48;margin-top:-1px}.noticejs .warning .noticejs-progressbar .noticejs-bar{width:100%;height:5px;background:#f44e06}.noticejs .error .noticejs-progressbar{width:100%;background-color:#e74c3c;margin-top:-1px}.noticejs .error .noticejs-progressbar .noticejs-bar{width:100%;height:5px;background:#ba2c1d}@keyframes noticejs-fadeOut{0%{opacity:1}to{opacity:0}}.noticejs-fadeOut{animation-name:noticejs-fadeOut}@keyframes noticejs-modal-in{to{opacity:.3}}@keyframes noticejs-modal-out{to{opacity:0}}.noticejs-rtl .noticejs-heading{direction:rtl}.noticejs-rtl .close{float:left!important;margin-left:7px;margin-right:0!important}.noticejs-rtl .noticejs-content{direction:rtl}.noticejs{position:fixed;z-index:10050;width:320px}.noticejs ::-webkit-scrollbar{width:8px}.noticejs ::-webkit-scrollbar-button{width:8px;height:5px}.noticejs ::-webkit-scrollbar-track{border-radius:10px}.noticejs ::-webkit-scrollbar-thumb{background:hsla(0,0%,100%,.5);border-radius:10px}.noticejs ::-webkit-scrollbar-thumb:hover{background:#fff}.noticejs-modal{position:fixed;width:100%;height:100%;background-color:#000;z-index:10000;opacity:.3;left:0;top:0}.noticejs-modal-open{opacity:0;animation:noticejs-modal-in .3s ease-out}.noticejs-modal-close{animation:noticejs-modal-out .3s ease-out;animation-fill-mode:forwards}", ""]);
  680. // Exports
  681. module.exports = exports;
  682.  
  683.  
  684. /***/ }),
  685. /* 11 */
  686. /***/ (function(module, exports, __webpack_require__) {
  687.  
  688. var api = __webpack_require__(1);
  689. var content = __webpack_require__(12);
  690.  
  691. content = content.__esModule ? content.default : content;
  692.  
  693. if (typeof content === 'string') {
  694. content = [[module.i, content, '']];
  695. }
  696.  
  697. var options = {};
  698.  
  699. options.insert = "head";
  700. options.singleton = false;
  701.  
  702. var update = api(content, options);
  703.  
  704.  
  705.  
  706. module.exports = content.locals || {};
  707.  
  708. /***/ }),
  709. /* 12 */
  710. /***/ (function(module, exports, __webpack_require__) {
  711.  
  712. // Imports
  713. var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(2);
  714. exports = ___CSS_LOADER_API_IMPORT___(false);
  715. // Module
  716. exports.push([module.i, ".el-button {\r\n display: inline-block;\r\n line-height: 1;\r\n white-space: nowrap;\r\n cursor: pointer;\r\n background: #fff;\r\n border: 1px solid #dcdfe6;\r\n color: #606266;\r\n -webkit-appearance: none;\r\n text-align: center;\r\n box-sizing: border-box;\r\n outline: none;\r\n margin: 0;\r\n transition: .1s;\r\n font-weight: 500;\r\n -moz-user-select: none;\r\n -webkit-user-select: none;\r\n -ms-user-select: none;\r\n padding: 12px 20px;\r\n font-size: 14px;\r\n border-radius: 4px;\r\n}\r\n\r\n.el-button--primary {\r\n color: #fff;\r\n background-color: #409eff;\r\n border-color: #409eff;\r\n}\r\n\r\n.el-button--primary:hover {\r\n background: #66b1ff;\r\n border-color: #66b1ff;\r\n color: #fff;\r\n}\r\n\r\n.el-button.is-disabled, .el-button.is-disabled:focus, .el-button.is-disabled:hover {\r\n color: #c0c4cc;\r\n cursor: not-allowed;\r\n background-image: none;\r\n background-color: #fff;\r\n border-color: #ebeef5;\r\n}\r\n\r\n.el-button--success {\r\n color: #fff;\r\n background-color: #67c23a;\r\n border-color: #67c23a;\r\n}\r\n.el-button--success:hover {\r\n background: #85ce61;\r\n border-color: #85ce61;\r\n color: #fff;\r\n}\r\n\r\n.el-button--danger {\r\n color: #fff;\r\n background-color: #f56c6c;\r\n border-color: #f56c6c;\r\n}\r\n\r\n.el-button--danger:hover {\r\n background: #f78989;\r\n border-color: #f78989;\r\n color: #fff;\r\n}\r\n\r\n.el-button--warning {\r\n color: #fff;\r\n background-color: #e6a23c;\r\n border-color: #e6a23c;\r\n}\r\n\r\n.el-button--warning:focus, .el-button--warning:hover {\r\n background: #ebb563;\r\n border-color: #ebb563;\r\n color: #fff;\r\n}", ""]);
  717. // Exports
  718. module.exports = exports;
  719.  
  720.  
  721. /***/ }),
  722. /* 13 */
  723. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  724.  
  725. "use strict";
  726. /* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_vue_loader_dist_index_js_ref_8_0_SkinInfo_vue_vue_type_style_index_0_id_c03073cc_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
  727. /* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_vue_loader_dist_index_js_ref_8_0_SkinInfo_vue_vue_type_style_index_0_id_c03073cc_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_vue_loader_dist_index_js_ref_8_0_SkinInfo_vue_vue_type_style_index_0_id_c03073cc_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
  728. /* unused harmony reexport * */
  729.  
  730.  
  731. /***/ }),
  732. /* 14 */
  733. /***/ (function(module, exports, __webpack_require__) {
  734.  
  735. // Imports
  736. var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(2);
  737. exports = ___CSS_LOADER_API_IMPORT___(false);
  738. // Module
  739. exports.push([module.i, "\n.imgWrap[data-v-c03073cc] {\r\n text-align: center;\r\n background: url(https://buff.163.com/static/images/item_bg.png);\r\n background-size: cover;\r\n width: 88px;\r\n height: 66px;\n}\n.imgWrap img[data-v-c03073cc] {\r\n width: 66px;\r\n height: 66px;\r\n max-width: 88px;\n}\n.imgWrap .view-btn[data-v-c03073cc] {\r\n display: block;\r\n width: 48px;\r\n position: relative;\r\n top: -22px;\r\n left: 2px;\r\n color: white !important;\n}\n.infoWrap[data-v-c03073cc] {\r\n margin-left: 15px;\r\n display: flex;\r\n flex-direction: column;\r\n text-align: left;\r\n justify-content: flex-end;\n}\r\n", ""]);
  740. // Exports
  741. module.exports = exports;
  742.  
  743.  
  744. /***/ }),
  745. /* 15 */
  746. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  747.  
  748. "use strict";
  749. /* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_vue_loader_dist_index_js_ref_8_0_CompareList_vue_vue_type_style_index_0_id_8a9384f8_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
  750. /* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_vue_loader_dist_index_js_ref_8_0_CompareList_vue_vue_type_style_index_0_id_8a9384f8_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_vue_loader_dist_index_js_ref_8_0_CompareList_vue_vue_type_style_index_0_id_8a9384f8_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
  751. /* unused harmony reexport * */
  752.  
  753.  
  754. /***/ }),
  755. /* 16 */
  756. /***/ (function(module, exports, __webpack_require__) {
  757.  
  758. // Imports
  759. var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(2);
  760. exports = ___CSS_LOADER_API_IMPORT___(false);
  761. // Module
  762. exports.push([module.i, "\n.compare__table[data-v-8a9384f8] {\r\n width: 100%;\r\n margin-bottom: 1rem;\r\n color: rgb(29,30,35);\r\n border-collapse: collapse;\r\n border-spacing: 0;\r\n text-align: center;\n}\n.compare__table th[data-v-8a9384f8], .compare__table td[data-v-8a9384f8]{\r\n border: 1px solid #dee2e6;\r\n padding: .75rem;\n}\n.compare__table thead th[data-v-8a9384f8]{\r\n color: #fff;\r\n background-color: #343a40;\r\n border-color: #454d55;\n}\n.compare__table tbody[data-v-8a9384f8] {\r\n display: block;\r\n height: 400px;\r\n overflow-y: scroll;\r\n overflow-x: hidden;\n}\n.compare__table thead[data-v-8a9384f8],\r\n.compare__table tbody tr[data-v-8a9384f8] {\r\n display: table;\r\n width: 100%;\r\n table-layout: fixed;\n}\n.compare__table thead[data-v-8a9384f8] {\r\n width: calc( 100% - 4px)\n}\n.compare__table tbody tr[data-v-8a9384f8]:hover {\r\n background: rgb(245,245,245);\n}\n.list-footer[data-v-8a9384f8]{\r\n text-align: right;\n}\r\n", ""]);
  763. // Exports
  764. module.exports = exports;
  765.  
  766.  
  767. /***/ }),
  768. /* 17 */
  769. /***/ (function(module, exports, __webpack_require__) {
  770.  
  771. var api = __webpack_require__(1);
  772. var content = __webpack_require__(18);
  773.  
  774. content = content.__esModule ? content.default : content;
  775.  
  776. if (typeof content === 'string') {
  777. content = [[module.i, content, '']];
  778. }
  779.  
  780. var options = {};
  781.  
  782. options.insert = "head";
  783. options.singleton = false;
  784.  
  785. var update = api(content, options);
  786.  
  787.  
  788.  
  789. module.exports = content.locals || {};
  790.  
  791. /***/ }),
  792. /* 18 */
  793. /***/ (function(module, exports, __webpack_require__) {
  794.  
  795. // Imports
  796. var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(2);
  797. exports = ___CSS_LOADER_API_IMPORT___(false);
  798. // Module
  799. exports.push([module.i, ".compare__wrap {\r\n position: absolute;\r\n z-index: 1015;\r\n}\r\n\r\n.compare__mask {\r\n width: 100%;\r\n height: 100%;\r\n background-color: rgba(0, 0, 0, 0.6);\r\n}\r\n\r\n.compare__dialog {\r\n padding: 10px;\r\n width: 800px;\r\n height: 500px;\r\n background-color: white;\r\n position: fixed;\r\n left: 0;\r\n right: 0;\r\n top: 250px;\r\n margin: auto;\r\n box-shadow: 0px 0px 10px 0px #888888;\r\n border-radius: 10px;\r\n}", ""]);
  800. // Exports
  801. module.exports = exports;
  802.  
  803.  
  804. /***/ }),
  805. /* 19 */
  806. /***/ (function(module, exports, __webpack_require__) {
  807.  
  808. var api = __webpack_require__(1);
  809. var content = __webpack_require__(20);
  810.  
  811. content = content.__esModule ? content.default : content;
  812.  
  813. if (typeof content === 'string') {
  814. content = [[module.i, content, '']];
  815. }
  816.  
  817. var options = {};
  818.  
  819. options.insert = "head";
  820. options.singleton = false;
  821.  
  822. var update = api(content, options);
  823.  
  824.  
  825.  
  826. module.exports = content.locals || {};
  827.  
  828. /***/ }),
  829. /* 20 */
  830. /***/ (function(module, exports, __webpack_require__) {
  831.  
  832. // Imports
  833. var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(2);
  834. exports = ___CSS_LOADER_API_IMPORT___(false);
  835. // Module
  836. exports.push([module.i, "* {\r\n padding: 0;\r\n margin: 0;\r\n}\r\n\r\n.compare3d__iframe {\r\n width: 100%;\r\n height: 100vh;\r\n border: 0px solid white;\r\n}\r\n\r\n.compare3d__tips {\r\n position: fixed;\r\n color: rgba(255, 255, 255, 0.6);\r\n font-size: 14px;\r\n top: 70px;\r\n left: 10px;\r\n cursor: default;\r\n user-select: none;\r\n}\r\n\r\n.compare3d__watermark {\r\n position: fixed;\r\n right: 10px;\r\n top: 70px;\r\n color: rgba(255, 255, 255, 0.6);\r\n z-index: 1;\r\n cursor: pointer;\r\n font-size: 24px;\r\n user-select: none;\r\n}", ""]);
  837. // Exports
  838. module.exports = exports;
  839.  
  840.  
  841. /***/ }),
  842. /* 21 */
  843. /***/ (function(module, exports, __webpack_require__) {
  844.  
  845. var api = __webpack_require__(1);
  846. var content = __webpack_require__(22);
  847.  
  848. content = content.__esModule ? content.default : content;
  849.  
  850. if (typeof content === 'string') {
  851. content = [[module.i, content, '']];
  852. }
  853.  
  854. var options = {};
  855.  
  856. options.insert = "head";
  857. options.singleton = false;
  858.  
  859. var update = api(content, options);
  860.  
  861.  
  862.  
  863. module.exports = content.locals || {};
  864.  
  865. /***/ }),
  866. /* 22 */
  867. /***/ (function(module, exports, __webpack_require__) {
  868.  
  869. // Imports
  870. var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(2);
  871. exports = ___CSS_LOADER_API_IMPORT___(false);
  872. // Module
  873. exports.push([module.i, ".t_Left {\r\n position: relative;\r\n}\r\n\r\n.ex-time {\r\n position: absolute;\r\n margin-top: -35px;\r\n width: 100%;\r\n text-align: right;\r\n color: gray;\r\n font-size: 12px;\r\n}\r\n\r\n.ex-time span{\r\n margin-right: 10px;\r\n}", ""]);
  874. // Exports
  875. module.exports = exports;
  876.  
  877.  
  878. /***/ }),
  879. /* 23 */
  880. /***/ (function(module, exports, __webpack_require__) {
  881.  
  882. var api = __webpack_require__(1);
  883. var content = __webpack_require__(24);
  884.  
  885. content = content.__esModule ? content.default : content;
  886.  
  887. if (typeof content === 'string') {
  888. content = [[module.i, content, '']];
  889. }
  890.  
  891. var options = {};
  892.  
  893. options.insert = "head";
  894. options.singleton = false;
  895.  
  896. var update = api(content, options);
  897.  
  898.  
  899.  
  900. module.exports = content.locals || {};
  901.  
  902. /***/ }),
  903. /* 24 */
  904. /***/ (function(module, exports, __webpack_require__) {
  905.  
  906. // Imports
  907. var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(2);
  908. exports = ___CSS_LOADER_API_IMPORT___(false);
  909. // Module
  910. exports.push([module.i, "*,body {\r\n padding: 0;\r\n margin: 0;\r\n}\r\n\r\nhtml, body {\r\n width: 100%;\r\n height: 100%;\r\n}\r\n\r\n.pdl-10 {\r\n padding-left: 10px;\r\n}\r\n\r\n.pdl-20 {\r\n padding-left: 20px;\r\n}\r\n\r\n.wrap {\r\n display: flex;\r\n width: 100%;\r\n height: 100%;\r\n}\r\n\r\n.compare2d__watermark {\r\n position: fixed;\r\n right: 10px;\r\n top: 10px;\r\n color: rgba(255, 255, 255, 0.6);\r\n z-index: 1;\r\n cursor: pointer;\r\n font-size: 24px;\r\n user-select: none;\r\n}\r\n\r\n.skin1-info {\r\n position: fixed;\r\n left: 260px;\r\n bottom: 10px;\r\n color: rgba(255, 255, 255, 0.5);\r\n z-index: 1;\r\n cursor: pointer;\r\n font-size: 16px;\r\n}\r\n\r\n.skin2-info {\r\n position: fixed;\r\n right: 10px;\r\n bottom: 10px;\r\n color: rgba(255, 255, 255, 0.5);\r\n z-index: 1;\r\n cursor: pointer;\r\n font-size: 16px;\r\n}\r\n\r\n.menu {\r\n background-color: rgb(29,30,35);\r\n cursor: default;\r\n height: 100%;\r\n flex: 0 0 250px;\r\n color: rgba(255, 255, 255, 0.7);\r\n font-size: 16px;\r\n font-family: \"微软雅黑\";\r\n user-select:none;\r\n}\r\n\r\n.view {\r\n width: 100%;\r\n height: 100%;\r\n flex: 1;\r\n}\r\n\r\n.menu__title {\r\n text-align: center;\r\n font-size: 30px;\r\n font-weight: 600;\r\n margin-top: 15px;\r\n margin-bottom: 30px;\r\n color: #f6ca9d;\r\n}\r\n\r\n.sub__view {\r\n margin-bottom: 30px;\r\n}\r\n\r\n.view__title {\r\n font-size: 26px;\r\n font-weight: 600;\r\n margin-bottom: 10px;\r\n color: rgba(255, 255, 255, 0.9);\r\n}\r\n\r\n.view__item {\r\n cursor: pointer;\r\n height: 56px;\r\n line-height: 56px;\r\n}\r\n\r\n.view__item:hover {\r\n background-color: rgb(23,24,28);\r\n}\r\n\r\n.is-active {\r\n background-color: rgb(23,24,28);\r\n color: white;\r\n}\r\n\r\n.texture__title {\r\n font-size: 26px;\r\n font-weight: 600;\r\n margin-bottom: 10px;\r\n color: rgba(255, 255, 255, 0.9);\r\n}\r\n\r\n.texture__item {\r\n cursor: pointer;\r\n height: 56px;\r\n line-height: 56px;\r\n}\r\n\r\n.texture__item:hover {\r\n background-color: rgb(23,24,28);\r\n}", ""]);
  911. // Exports
  912. module.exports = exports;
  913.  
  914.  
  915. /***/ }),
  916. /* 25 */
  917. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  918.  
  919. "use strict";
  920. /* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_vue_loader_dist_index_js_ref_8_0_Compare_vue_vue_type_style_index_0_id_23fa4444_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);
  921. /* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_vue_loader_dist_index_js_ref_8_0_Compare_vue_vue_type_style_index_0_id_23fa4444_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_vue_loader_dist_index_js_ref_8_0_Compare_vue_vue_type_style_index_0_id_23fa4444_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
  922. /* unused harmony reexport * */
  923.  
  924.  
  925. /***/ }),
  926. /* 26 */
  927. /***/ (function(module, exports, __webpack_require__) {
  928.  
  929. // Imports
  930. var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(2);
  931. exports = ___CSS_LOADER_API_IMPORT___(false);
  932. // Module
  933. exports.push([module.i, "\n.panel[data-v-23fa4444] {\r\n width: 250px;\r\n height: 45px;\r\n background-color: rgba(255, 255, 255, 0.2);\r\n position: fixed;\r\n left: 0;\r\n bottom: 0;\r\n z-index: 1;\r\n padding: 10px;\r\n box-sizing: border-box;\r\n color: rgba(255,255,255,0.7);\n}\n.panel__slider[data-v-23fa4444] {\r\n display: inline-block;\r\n width: 160px;\n}\n.panel__option[data-v-23fa4444] {\r\n margin-bottom: 10px;\n}\n.panel__option[data-v-23fa4444]:last-child {\r\n margin-bottom: 0px;\n}\r\n", ""]);
  934. // Exports
  935. module.exports = exports;
  936.  
  937.  
  938. /***/ }),
  939. /* 27 */
  940. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  941.  
  942. "use strict";
  943. /* harmony import */ var _style_loader_dist_cjs_js_css_loader_dist_cjs_js_vue_loader_dist_stylePostLoader_js_default_css_vue_type_style_index_0_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7);
  944. /* harmony import */ var _style_loader_dist_cjs_js_css_loader_dist_cjs_js_vue_loader_dist_stylePostLoader_js_default_css_vue_type_style_index_0_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_cjs_js_css_loader_dist_cjs_js_vue_loader_dist_stylePostLoader_js_default_css_vue_type_style_index_0_lang_css__WEBPACK_IMPORTED_MODULE_0__);
  945. /* unused harmony reexport * */
  946.  
  947.  
  948. /***/ }),
  949. /* 28 */
  950. /***/ (function(module, exports, __webpack_require__) {
  951.  
  952. // Imports
  953. var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(2);
  954. exports = ___CSS_LOADER_API_IMPORT___(false);
  955. // Module
  956. exports.push([module.i, ".slider-target,.slider-target *{-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;touch-action:none;-ms-user-select:none;-moz-user-select:none;user-select:none;box-sizing:border-box}.slider-target{position:relative}.slider-base,.slider-connects{width:100%;height:100%;position:relative;z-index:1}.slider-connects{overflow:hidden;z-index:0}.slider-connect,.slider-origin{will-change:transform;position:absolute;z-index:1;top:0;right:0;-ms-transform-origin:0 0;-webkit-transform-origin:0 0;-webkit-transform-style:preserve-3d;transform-origin:0 0;transform-style:flat}.slider-connect{height:100%;width:100%}.slider-origin{height:10%;width:10%}.slider-txt-dir-rtl.slider-horizontal .slider-origin{left:0;right:auto}.slider-vertical .slider-origin{width:0}.slider-horizontal .slider-origin{height:0}.slider-handle{-webkit-backface-visibility:hidden;backface-visibility:hidden;position:absolute}.slider-touch-area{height:100%;width:100%}.slider-state-tap .slider-connect,.slider-state-tap .slider-origin{transition:transform .3s}.slider-state-drag *{cursor:inherit!important}.slider-horizontal{height:6px}.slider-horizontal .slider-handle{width:16px;height:16px;top:-6px;right:-8px}.slider-vertical{width:6px;height:300px}.slider-vertical .slider-handle{width:16px;height:16px;top:-8px;right:-6px}.slider-txt-dir-rtl.slider-horizontal .slider-handle{left:-8px;right:auto}.slider-base{background-color:#d4e0e7}.slider-base,.slider-connects{border-radius:3px}.slider-connect{background:#41b883;cursor:pointer}.slider-draggable{cursor:ew-resize}.slider-vertical .slider-draggable{cursor:ns-resize}.slider-handle{width:16px;height:16px;border-radius:50%;background:#fff;border:0;right:-8px;box-shadow:.5px .5px 2px 1px rgba(0,0,0,.32);cursor:-webkit-grab;cursor:grab}.slider-handle:focus{outline:none}.slider-active{box-shadow:.5px .5px 2px 1px rgba(0,0,0,.42);cursor:-webkit-grabbing;cursor:grabbing}[disabled] .slider-connect{background:#b8b8b8}[disabled].slider-handle,[disabled] .slider-handle,[disabled].slider-target{cursor:not-allowed}[disabled] .slider-tooltip{background:#b8b8b8;border-color:#b8b8b8}.slider-tooltip{position:absolute;display:block;font-size:14px;font-weight:500;white-space:nowrap;padding:2px 5px;min-width:20px;text-align:center;color:#fff;border-radius:5px;border:1px solid #41b883;background:#41b883}.slider-horizontal .slider-tooltip{transform:translate(-50%);left:50%;bottom:24px}.slider-horizontal .slider-tooltip:before{content:\"\";position:absolute;bottom:-10px;left:50%;width:0;height:0;border:5px solid transparent;border-top-color:inherit;transform:translate(-50%)}.slider-vertical .slider-tooltip{transform:translateY(-50%);top:50%;right:24px}.slider-vertical .slider-tooltip:before{content:\"\";position:absolute;right:-10px;top:50%;width:0;height:0;border:5px solid transparent;border-left-color:inherit;transform:translateY(-50%)}.slider-horizontal .slider-origin>.slider-tooltip{transform:translate(50%);left:auto;bottom:14px}.slider-vertical .slider-origin>.slider-tooltip{transform:translateY(-18px);top:auto;right:18px}.slider-pips,.slider-pips *{box-sizing:border-box}.slider-pips{position:absolute;color:#999}.slider-value{position:absolute;white-space:nowrap;text-align:center}.slider-value-sub{color:#ccc;font-size:10px}.slider-marker{position:absolute;background:#ccc}.slider-marker-large,.slider-marker-sub{background:#aaa}.slider-pips-horizontal{padding:10px 0;height:80px;top:100%;left:0;width:100%}.slider-value-horizontal{transform:translate(-50%,50%)}.slider-rtl .slider-value-horizontal{transform:translate(50%,50%)}.slider-marker-horizontal.slider-marker{margin-left:-1px;width:2px;height:5px}.slider-marker-horizontal.slider-marker-sub{height:10px}.slider-marker-horizontal.slider-marker-large{height:15px}.slider-pips-vertical{padding:0 10px;height:100%;top:0;left:100%}.slider-value-vertical{transform:translateY(-50%);padding-left:25px}.slider-rtl .slider-value-vertical{transform:translateY(50%)}.slider-marker-vertical.slider-marker{width:5px;height:2px;margin-top:-1px}.slider-marker-vertical.slider-marker-sub{width:10px}.slider-marker-vertical.slider-marker-large{width:15px}", ""]);
  957. // Exports
  958. module.exports = exports;
  959.  
  960.  
  961. /***/ }),
  962. /* 29 */
  963. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  964.  
  965. "use strict";
  966. /* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_vue_loader_dist_index_js_ref_8_0_Diff_vue_vue_type_style_index_1_id_45eea504_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
  967. /* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_vue_loader_dist_index_js_ref_8_0_Diff_vue_vue_type_style_index_1_id_45eea504_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_vue_loader_dist_index_js_ref_8_0_Diff_vue_vue_type_style_index_1_id_45eea504_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
  968. /* unused harmony reexport * */
  969.  
  970.  
  971. /***/ }),
  972. /* 30 */
  973. /***/ (function(module, exports, __webpack_require__) {
  974.  
  975. // Imports
  976. var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(2);
  977. exports = ___CSS_LOADER_API_IMPORT___(false);
  978. // Module
  979. exports.push([module.i, "\n.panel[data-v-45eea504] {\r\n width: 250px;\r\n height: 110px;\r\n background-color: rgba(255, 255, 255, 0.2);\r\n position: fixed;\r\n left: 0;\r\n bottom: 0;\r\n z-index: 1;\r\n padding: 10px;\r\n box-sizing: border-box;\r\n color: rgba(255,255,255,0.7);\n}\n.panel__slider[data-v-45eea504] {\r\n display: inline-block;\r\n width: 160px;\n}\n.panel__option[data-v-45eea504] {\r\n margin-bottom: 10px;\n}\n.panel__option[data-v-45eea504]:last-child {\r\n margin-bottom: 0px;\n}\r\n", ""]);
  980. // Exports
  981. module.exports = exports;
  982.  
  983.  
  984. /***/ }),
  985. /* 31 */
  986. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  987.  
  988. "use strict";
  989. // ESM COMPAT FLAG
  990. __webpack_require__.r(__webpack_exports__);
  991.  
  992. // CONCATENATED MODULE: ./src/pages/buff/packages/AddButton/apis/index.js
  993. function getAssetIdInfo(assetid) {
  994. return fetch('https://buff.163.com/api/market/csgo_inspect_3d?assetid=' + assetid,{
  995. method: 'GET',
  996. mode: 'no-cors',
  997. // cache: 'default',
  998. // credentials: 'include',
  999. })
  1000. }
  1001. // EXTERNAL MODULE: ./src/utils/Notice/Notice.css
  1002. var Notice = __webpack_require__(9);
  1003.  
  1004. // CONCATENATED MODULE: ./src/utils/index.js
  1005. // 公共
  1006.  
  1007.  
  1008. function getStrMiddle(str, before, after) {
  1009. // 取中间文本
  1010. let m = str.match(new RegExp(before + '(.*?)' + after));
  1011. return m ? m[1] : false;
  1012. }
  1013.  
  1014. function showMessage(msg, type) {
  1015. // type: success[green] error[red] warning[orange] info[blue]
  1016. new NoticeJs({
  1017. text: msg,
  1018. type: type,
  1019. position: 'bottomRight',
  1020. }).show();
  1021. }
  1022.  
  1023. function getBase64(imgUrl, callback) {
  1024. window.URL = window.URL || window.webkitURL;
  1025. var xhr = new XMLHttpRequest();
  1026. xhr.open("get", imgUrl, true);
  1027. xhr.responseType = "blob";
  1028. xhr.onload = function () {
  1029. if (this.status == 200) {
  1030. var blob = this.response;
  1031. let oFileReader = new FileReader();
  1032. oFileReader.onloadend = function (e) {
  1033. let base64 = e.target.result;
  1034. callback(base64);
  1035. };
  1036. oFileReader.readAsDataURL(blob);
  1037. }
  1038. }
  1039. xhr.send();
  1040. }
  1041.  
  1042. // 模拟鼠标按住拖动
  1043. function createMouseEvent(eventName, ofsx, ofsy) {
  1044. let evt = document.createEvent('MouseEvents');
  1045. evt = new MouseEvent(eventName, {
  1046. clientX: ofsx,
  1047. clientY: ofsy,
  1048. bubbles: true
  1049. })
  1050. evt.isMessage = true;
  1051. return evt
  1052. };
  1053.  
  1054. function setMouseMove(dom, x, y) {
  1055. dom.dispatchEvent(createMouseEvent("mousedown"));
  1056. dom.dispatchEvent(createMouseEvent("mousemove", x, y));
  1057. dom.dispatchEvent(createMouseEvent("mouseup"));
  1058. }
  1059.  
  1060. // 获取URL参数
  1061. function getQueryString(name) {
  1062. let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
  1063. let r = window.location.search.substr(1).match(reg);
  1064. if (r != null) return unescape(r[2]); return null;
  1065. }
  1066.  
  1067. function dateFormat(fmt, date) {
  1068. let o = {
  1069. "M+": date.getMonth() + 1,
  1070. "d+": date.getDate(),
  1071. "h+": date.getHours(),
  1072. "m+": date.getMinutes(),
  1073. "s+": date.getSeconds(),
  1074. "q+": Math.floor((date.getMonth() + 3) / 3),
  1075. "S": date.getMilliseconds()
  1076. };
  1077. if (/(y+)/.test(fmt))
  1078. fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
  1079. for (let k in o)
  1080. if (new RegExp("(" + k + ")").test(fmt))
  1081. fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
  1082. return fmt;
  1083. }
  1084. // CONCATENATED MODULE: ./src/utils/DomHook/DomHook.js
  1085. class DomHook {
  1086. constructor(selector, isSubtree, callback) {
  1087. this.selector = selector;
  1088. this.isSubtree = isSubtree;
  1089. let targetNode = document.querySelector(this.selector);
  1090. if (targetNode == null) {
  1091. return;
  1092. }
  1093. let observer = new MutationObserver(function(mutations) {
  1094. callback(mutations);
  1095. });
  1096. this.observer = observer;
  1097. this.observer.observe(targetNode, { attributes: true, childList: true, subtree: this.isSubtree });
  1098. }
  1099. closeHook() {
  1100. this.observer.disconnect();
  1101. }
  1102. }
  1103.  
  1104.  
  1105. // CONCATENATED MODULE: ./src/utils/DomHook/index.js
  1106.  
  1107.  
  1108.  
  1109. // CONCATENATED MODULE: ./src/pages/buff/packages/AddButton/index.js
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115. let skinImg // 皮肤图片地址
  1116. let skinName // 皮肤名字
  1117. const LIST_MAX = 50 // 对比列表最多存放数
  1118.  
  1119. function init() {
  1120. initDom();
  1121. initFunc();
  1122. let hook = new DomHook(".detail-tab-cont", false, (m => {
  1123. for (let i = 0; i < m[0].addedNodes.length; i++) {
  1124. let item = m[0].addedNodes[i];
  1125. if (item.id == "market-selling-list") {
  1126. initDom();
  1127. initFunc();
  1128. break;
  1129. }
  1130. }
  1131. }))
  1132. }
  1133.  
  1134. function initDom() {
  1135. initDom_addBtn();
  1136. // initDom_CopyBtn();
  1137. }
  1138.  
  1139. function initDom_addBtn() {
  1140. skinImg = getSkinImg();
  1141. skinName = getSkinName();
  1142. let domList = document.getElementsByClassName("ctag btn_action_link");
  1143. for (let i = 0; i < domList.length; i++) {
  1144. let parentDom = domList[i].parentNode;
  1145. let trDom = domList[i].parentNode.parentNode.parentNode.parentNode;
  1146. let assetid = domList[i].getAttribute("data-assetid");
  1147. let inspectUrl = trDom.getElementsByClassName("csgo_inspect_img_btn")[0].getAttribute("data-inspecturl");
  1148. if (!trDom.getElementsByClassName("btn-buy-order")[0]) {
  1149. // 有自己上架的饰品
  1150. continue;
  1151. }
  1152. let price = trDom.getElementsByClassName("btn-buy-order")[0].getAttribute("data-price");
  1153. let shopDom = trDom.getElementsByClassName("j_shoptip_handler")[0];
  1154. let shopHref = shopDom.href;
  1155. let shopImg = shopDom.getElementsByClassName("user-avatar")[0].src;
  1156. let shopName = shopDom.innerText;
  1157. if (assetid) {
  1158. let dom = document.createElement("a");
  1159. dom.className = "ctag compare-btn";
  1160. dom.setAttribute("assetid", assetid);
  1161. dom.setAttribute("inspecturl", inspectUrl);
  1162. dom.setAttribute("price", price);
  1163. dom.setAttribute("shop_href", shopHref);
  1164. dom.setAttribute("shop_img", shopImg);
  1165. dom.setAttribute("shop_name", shopName);
  1166. dom.innerHTML = `<b><i class="icon"><svg t="1621435629962" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10682" width="16" height="16"><path d="M896 452.48l-211.2-122.88a32 32 0 0 0-16-4.48 32.64 32.64 0 0 0-16 4.48l-53.76 30.72v-60.16a32 32 0 0 0-16-27.52l-211.2-122.88a31.36 31.36 0 0 0-16-4.48 32 32 0 0 0-16 4.48L128 272a32 32 0 0 0-16 27.52V544a32 32 0 0 0 16 27.52l211.2 122.88a32 32 0 0 0 16 4.48 32.64 32.64 0 0 0 16-4.48l21.76-12.16V608l-37.76 21.76-179.84-104.32V320l180.48-105.6L535.68 320V526.08l-46.08 26.88v-55.04l14.08-8.32V416l-64 35.84a32 32 0 0 0-16 27.52V723.84a32 32 0 0 0 16 27.52l211.84 122.88a32 32 0 0 0 32 0l212.48-121.6a32 32 0 0 0 16-27.52V480a32 32 0 0 0-16-27.52z m-48.64 256l-179.84 103.68L488.32 704V626.56l94.08-54.4a32 32 0 0 0 16-27.52V434.56l69.76-40.32 179.84 104.32z" fill="#040c32" p-id="10683"></path></svg></i></b>加入对比`;
  1167. parentDom.appendChild(dom);
  1168. }
  1169. }
  1170. }
  1171.  
  1172. function initDom_CopyBtn() {
  1173. let domList = document.getElementsByClassName("pic-cont item-detail-img");
  1174. for (let i = 0; i < domList.length; i++) {
  1175. let trDom = domList[i].parentNode.parentNode;
  1176. let parentDom = trDom.getElementsByClassName("csgo_value")[0];
  1177. let sell_order_id = domList[i].getAttribute("data-orderid");
  1178. let assetid = domList[i].getAttribute("data-assetid");
  1179. let appid = domList[i].getAttribute("data-appid");
  1180. let classid = domList[i].getAttribute("data-classid");
  1181. let instanceid = domList[i].getAttribute("data-instanceid");
  1182.  
  1183. let dom = document.createElement("a");
  1184. dom.style.marginLeft = "5px";
  1185. dom.className = "ctag copylink-btn";
  1186. dom.setAttribute("assetid", assetid);
  1187. dom.setAttribute("instanceid", instanceid);
  1188. dom.setAttribute("appid", appid);
  1189. dom.setAttribute("classid", classid);
  1190. dom.setAttribute("sell_order_id", sell_order_id);
  1191. dom.innerHTML = `<b><i class="icon">
  1192. <svg t="1639763479087" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3348" width="16" height="16"><path d="M184.61 839.39a273 273 0 0 1 0-386.08l78.49-78.49a8 8 0 0 1 11.31 0l39.6 39.6a8 8 0 0 1 0 11.31L236.75 503c-78.13 78.14-79.4 207.24-1.3 285.42 78.36 78.44 205.93 78.46 284.33 0.07L598.27 710a8 8 0 0 1 11.31 0l39.6 39.6a8 8 0 0 1 0 11.31l-78.49 78.49a273 273 0 0 1-386.08 0zM749.59 649.18L710 609.58a8 8 0 0 1 0-11.31L787.25 521c78.13-78.14 79.4-207.24 1.3-285.42-78.36-78.44-205.93-78.46-284.33-0.07L425.73 314a8 8 0 0 1-11.31 0l-39.6-39.6a8 8 0 0 1 0-11.31l78.49-78.49a273 273 0 1 1 386.08 386.09l-78.49 78.49a8 8 0 0 1-11.31 0z" fill="#264097" p-id="3349"></path><path d="M328.149823 644.936246m5.656854-5.656854l305.470129-305.470129q5.656854-5.656854 11.313709 0l39.59798 39.597979q5.656854 5.656854 0 11.313709l-305.47013 305.470129q-5.656854 5.656854-11.313708 0l-39.59798-39.597979q-5.656854-5.656854 0-11.313709Z" fill="#264097" p-id="3350"></path></svg>
  1193. </i></b>检视链接`;
  1194. parentDom.appendChild(dom);
  1195. }
  1196. }
  1197.  
  1198. function initFunc() {
  1199. let domList = document.getElementsByClassName("compare-btn");
  1200. for (let i = 0; i < domList.length; i++) {
  1201. domList[i].addEventListener("click", () => {
  1202. let assetid = domList[i].getAttribute("assetid");
  1203. let inspectUrl = domList[i].getAttribute("inspecturl");
  1204. let price = domList[i].getAttribute("price");
  1205. let shopHref = domList[i].getAttribute("shop_href");
  1206. let shopImg = domList[i].getAttribute("shop_img");
  1207. let shopName = domList[i].getAttribute("shop_name");
  1208. onClickAddButton({
  1209. assetid: assetid,
  1210. inspectUrl: inspectUrl,
  1211. price: price,
  1212. shopHref: shopHref,
  1213. shopImg: shopImg,
  1214. shopName: shopName
  1215. });
  1216. })
  1217. }
  1218.  
  1219. let domListCopy = document.getElementsByClassName("copylink-btn");
  1220. for (let i = 0; i < domListCopy.length; i++) {
  1221. domListCopy[i].addEventListener("click", () => {
  1222. let assetid = domListCopy[i].getAttribute("assetid");
  1223. let instanceid = domListCopy[i].getAttribute("instanceid");
  1224. let appid = domListCopy[i].getAttribute("appid");
  1225. let classid = domListCopy[i].getAttribute("classid");
  1226. let sell_order_id = domListCopy[i].getAttribute("sell_order_id");
  1227. let text = `https://buff.163.com/market/m/item_detail?game=csgo&assetid=${assetid}&classid=${classid}&instanceid=${instanceid}&sell_order_id=${sell_order_id}`
  1228. GM_setClipboard(text);
  1229. showMessage("复制成功,可粘贴至社区服检视", "success");
  1230. })
  1231. }
  1232. }
  1233.  
  1234. function onClickAddButton(info) {
  1235. // GM_deleteValue("CompareList");
  1236. // return
  1237. getAssetIdInfo(info.assetid).then(res => {
  1238. return res.json();
  1239. }).then(ret => {
  1240. if (ret.code === "Error") {
  1241. showMessage("解析该饰品失败,暂不支持3D", "error");
  1242. return;
  1243. }
  1244. let obj = getSkinData(ret.data);
  1245. obj.assetid = info.assetid;
  1246. obj.price = info.price;
  1247. obj.inspectUrl = info.inspectUrl;
  1248. obj.shopHref = info.shopHref;
  1249. obj.shopImg = info.shopImg;
  1250. obj.shopName = info.shopName;
  1251. if (obj) {
  1252. if (saveData2CompareList(obj)) {
  1253. showMessage("加入对比列表成功", "success");
  1254. } else {
  1255. showMessage("该饰品已存在于对比列表", "error");
  1256. }
  1257. } else {
  1258. showMessage("加入对比列表失败", "error");
  1259. }
  1260. }).catch(err => {
  1261. console.log(err);
  1262. })
  1263. }
  1264.  
  1265. function getSkinData(data) {
  1266. // 构造对比列表里的饰品对象信息
  1267. let ret = data;
  1268. if (data) {
  1269. let i = 1;
  1270. let textureList = [];
  1271. for (const key in data.texture_url) {
  1272. textureList.push({id: key, url: data.texture_url[key]});
  1273. }
  1274. // while (`texture_${i}` in data.texture_url) {
  1275. // if (i > 1000) {
  1276. // // 熔断
  1277. // break;
  1278. // }
  1279. // textureList.push({id: `texture_${i}`, url: data.texture_url[`texture_${i}`]});
  1280. // i++;
  1281. // }
  1282. ret.textures = textureList;
  1283. ret.name = skinName;
  1284. ret.img_url = skinImg;
  1285. ret.update_time = new Date().getTime();
  1286. }
  1287. return ret;
  1288. }
  1289.  
  1290. function getSkinImg() {
  1291. return document.getElementsByClassName("t_Center")[1].getElementsByTagName("img")[0].src;
  1292. }
  1293.  
  1294. function getSkinName() {
  1295. let ret = "";
  1296. let parent = document.getElementsByClassName("cru-goods");
  1297. for (let i = 0; i < parent.length; i++) {
  1298. let item = parent[i];
  1299. ret += item.innerText;
  1300. }
  1301. return ret;
  1302. }
  1303.  
  1304. function saveData2CompareList(data) {
  1305. let value = GM_getValue("CompareList") || "[]";
  1306. let compareList = JSON.parse(value);
  1307.  
  1308. let isExist = false;
  1309. for (let i = 0; i < compareList.length; i++) {
  1310. if (data.assetid == compareList[i].assetid) {
  1311. isExist = true;
  1312. break;
  1313. }
  1314. }
  1315. if (isExist) {
  1316. return false;
  1317. }
  1318. if (compareList.length > LIST_MAX) {
  1319. compareList.pop(); // 删除最后一个
  1320. }
  1321. compareList.unshift(data); // 插入到第一个
  1322. let text = JSON.stringify(compareList);
  1323. GM_setValue("CompareList", text);
  1324. return true;
  1325. }
  1326.  
  1327. /* harmony default export */ var AddButton = ({
  1328. init
  1329. });
  1330. // EXTERNAL MODULE: external "Vue"
  1331. var external_Vue_ = __webpack_require__(0);
  1332.  
  1333. // CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ref--5!./node_modules/vue-loader/dist??ref--8-0!./src/pages/buff/packages/CompareList/views/CompareList.vue?vue&type=template&id=8a9384f8&scoped=true
  1334.  
  1335. const _withId = /*#__PURE__*/Object(external_Vue_["withScopeId"])("data-v-8a9384f8")
  1336.  
  1337. Object(external_Vue_["pushScopeId"])("data-v-8a9384f8")
  1338. const _hoisted_1 = { class: "compare__table" }
  1339. const _hoisted_2 = /*#__PURE__*/Object(external_Vue_["createVNode"])("thead", null, [
  1340. /*#__PURE__*/Object(external_Vue_["createVNode"])("tr", null, [
  1341. /*#__PURE__*/Object(external_Vue_["createVNode"])("th", { width: "7%" }),
  1342. /*#__PURE__*/Object(external_Vue_["createVNode"])("th", null, "饰品"),
  1343. /*#__PURE__*/Object(external_Vue_["createVNode"])("th", { width: "25%" }, "卖家"),
  1344. /*#__PURE__*/Object(external_Vue_["createVNode"])("th", { width: "15%" }, "检视")
  1345. ])
  1346. ], -1 /* HOISTED */)
  1347. const _hoisted_3 = { width: "7%" }
  1348. const _hoisted_4 = {
  1349. width: "25%",
  1350. style: {"text-align":"left"}
  1351. }
  1352. const _hoisted_5 = { width: "15%" }
  1353. const _hoisted_6 = /*#__PURE__*/Object(external_Vue_["createVNode"])("b", null, [
  1354. /*#__PURE__*/Object(external_Vue_["createVNode"])("i", { class: "icon icon_3d" })
  1355. ], -1 /* HOISTED */)
  1356. const _hoisted_7 = /*#__PURE__*/Object(external_Vue_["createTextVNode"])("3D检视")
  1357. const _hoisted_8 = /*#__PURE__*/Object(external_Vue_["createVNode"])("b", null, [
  1358. /*#__PURE__*/Object(external_Vue_["createVNode"])("i", { class: "icon icon_game" })
  1359. ], -1 /* HOISTED */)
  1360. const _hoisted_9 = /*#__PURE__*/Object(external_Vue_["createTextVNode"])("社区服检视")
  1361. const _hoisted_10 = { class: "list-footer" }
  1362. const _hoisted_11 = /*#__PURE__*/Object(external_Vue_["createVNode"])("span", null, "全部删除", -1 /* HOISTED */)
  1363. const _hoisted_12 = /*#__PURE__*/Object(external_Vue_["createVNode"])("span", null, "删除选中", -1 /* HOISTED */)
  1364. const _hoisted_13 = /*#__PURE__*/Object(external_Vue_["createVNode"])("span", null, "2D对比", -1 /* HOISTED */)
  1365. const _hoisted_14 = /*#__PURE__*/Object(external_Vue_["createVNode"])("span", null, "3D对比", -1 /* HOISTED */)
  1366. Object(external_Vue_["popScopeId"])()
  1367.  
  1368. const render = /*#__PURE__*/_withId((_ctx, _cache, $props, $setup, $data, $options) => {
  1369. const _component_skin_info = Object(external_Vue_["resolveComponent"])("skin-info")
  1370.  
  1371. return (Object(external_Vue_["openBlock"])(), Object(external_Vue_["createBlock"])("div", null, [
  1372. Object(external_Vue_["createVNode"])("table", _hoisted_1, [
  1373. _hoisted_2,
  1374. Object(external_Vue_["createVNode"])("tbody", null, [
  1375. (Object(external_Vue_["openBlock"])(true), Object(external_Vue_["createBlock"])(external_Vue_["Fragment"], null, Object(external_Vue_["renderList"])(_ctx.compareList, (item, index) => {
  1376. return (Object(external_Vue_["openBlock"])(), Object(external_Vue_["createBlock"])("tr", {
  1377. key: item.assetid
  1378. }, [
  1379. Object(external_Vue_["createVNode"])("td", _hoisted_3, [
  1380. Object(external_Vue_["withDirectives"])(Object(external_Vue_["createVNode"])("input", {
  1381. type: "checkbox",
  1382. id: item.assetid,
  1383. value: item.assetid,
  1384. "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (_ctx.checkedList = $event))
  1385. }, null, 8 /* PROPS */, ["id", "value"]), [
  1386. [external_Vue_["vModelCheckbox"], _ctx.checkedList]
  1387. ])
  1388. ]),
  1389. Object(external_Vue_["createVNode"])("td", null, [
  1390. Object(external_Vue_["createVNode"])(_component_skin_info, {
  1391. assetid: item.assetid,
  1392. imgUrl: item.img_url,
  1393. viewUrl: item.inspectUrl,
  1394. skinName: item.name,
  1395. skinSeed: item.asset_info.paintseed,
  1396. skinWear: item.asset_info.paintwear
  1397. }, null, 8 /* PROPS */, ["assetid", "imgUrl", "viewUrl", "skinName", "skinSeed", "skinWear"])
  1398. ]),
  1399. Object(external_Vue_["createVNode"])("td", _hoisted_4, [
  1400. Object(external_Vue_["createVNode"])("a", {
  1401. href: item.shopHref,
  1402. class: "j_shoptip_handler",
  1403. target: "_blank"
  1404. }, [
  1405. Object(external_Vue_["createVNode"])("img", {
  1406. src: item.shopImg,
  1407. width: "30",
  1408. height: "30",
  1409. class: "user-thum"
  1410. }, null, 8 /* PROPS */, ["src"]),
  1411. Object(external_Vue_["createTextVNode"])(" " + Object(external_Vue_["toDisplayString"])(item.shopName), 1 /* TEXT */)
  1412. ], 8 /* PROPS */, ["href"])
  1413. ]),
  1414. Object(external_Vue_["createVNode"])("td", _hoisted_5, [
  1415. Object(external_Vue_["createVNode"])("a", {
  1416. class: "ctag btn_3d",
  1417. "data-assetid": item.assetid
  1418. }, [
  1419. _hoisted_6,
  1420. _hoisted_7
  1421. ], 8 /* PROPS */, ["data-assetid"]),
  1422. Object(external_Vue_["createVNode"])("a", {
  1423. class: "ctag btn_game_cms",
  1424. "data-assetid": item.assetid,
  1425. target: "_blank"
  1426. }, [
  1427. _hoisted_8,
  1428. _hoisted_9
  1429. ], 8 /* PROPS */, ["data-assetid"])
  1430. ])
  1431. ]))
  1432. }), 128 /* KEYED_FRAGMENT */))
  1433. ])
  1434. ]),
  1435. Object(external_Vue_["createVNode"])("div", _hoisted_10, [
  1436. Object(external_Vue_["createVNode"])("button", {
  1437. onClick: _cache[2] || (_cache[2] = (...args) => (_ctx.onClickClear && _ctx.onClickClear(...args))),
  1438. type: "button",
  1439. class: "el-button el-button--danger",
  1440. style: {"margin-right":"10px","width":"100px"}
  1441. }, [
  1442. _hoisted_11
  1443. ]),
  1444. Object(external_Vue_["createVNode"])("button", {
  1445. onClick: _cache[3] || (_cache[3] = (...args) => (_ctx.onClickDelete && _ctx.onClickDelete(...args))),
  1446. type: "button",
  1447. class: "el-button el-button--warning",
  1448. style: {"margin-right":"10px","width":"100px"}
  1449. }, [
  1450. _hoisted_12
  1451. ]),
  1452. Object(external_Vue_["createVNode"])("button", {
  1453. onClick: _cache[4] || (_cache[4] = (...args) => (_ctx.onClickCompare2d && _ctx.onClickCompare2d(...args))),
  1454. type: "button",
  1455. class: "el-button el-button--primary compare2d-btn",
  1456. style: {"margin-right":"10px","width":"100px"}
  1457. }, [
  1458. _hoisted_13
  1459. ]),
  1460. Object(external_Vue_["createVNode"])("button", {
  1461. onClick: _cache[5] || (_cache[5] = (...args) => (_ctx.onClickCompare3d && _ctx.onClickCompare3d(...args))),
  1462. type: "button",
  1463. class: "el-button el-button--success compare3d-btn",
  1464. style: {"width":"100px"}
  1465. }, [
  1466. _hoisted_14
  1467. ])
  1468. ])
  1469. ]))
  1470. })
  1471. // CONCATENATED MODULE: ./src/pages/buff/packages/CompareList/views/CompareList.vue?vue&type=template&id=8a9384f8&scoped=true
  1472.  
  1473. // EXTERNAL MODULE: ./src/global/styles/index.css
  1474. var styles = __webpack_require__(11);
  1475.  
  1476. // CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ref--5!./node_modules/vue-loader/dist??ref--8-0!./src/pages/buff/packages/CompareList/components/SkinInfo.vue?vue&type=template&id=c03073cc&scoped=true
  1477.  
  1478. const SkinInfovue_type_template_id_c03073cc_scoped_true_withId = /*#__PURE__*/Object(external_Vue_["withScopeId"])("data-v-c03073cc")
  1479.  
  1480. Object(external_Vue_["pushScopeId"])("data-v-c03073cc")
  1481. const SkinInfovue_type_template_id_c03073cc_scoped_true_hoisted_1 = { style: {"display":"flex"} }
  1482. const SkinInfovue_type_template_id_c03073cc_scoped_true_hoisted_2 = { class: "imgWrap" }
  1483. const SkinInfovue_type_template_id_c03073cc_scoped_true_hoisted_3 = { class: "infoWrap" }
  1484. const SkinInfovue_type_template_id_c03073cc_scoped_true_hoisted_4 = { style: {"font-weight":"600"} }
  1485. const SkinInfovue_type_template_id_c03073cc_scoped_true_hoisted_5 = { style: {"font-size":"12px","color":"#959595"} }
  1486. const SkinInfovue_type_template_id_c03073cc_scoped_true_hoisted_6 = { style: {"font-size":"12px","color":"#959595"} }
  1487. const SkinInfovue_type_template_id_c03073cc_scoped_true_hoisted_7 = { class: "wear" }
  1488. const SkinInfovue_type_template_id_c03073cc_scoped_true_hoisted_8 = { class: "wear-pointer" }
  1489. const SkinInfovue_type_template_id_c03073cc_scoped_true_hoisted_9 = /*#__PURE__*/Object(external_Vue_["createStaticVNode"])("<div class=\"progress\" style=\"margin-bottom:5px;\" data-v-c03073cc><div class=\"progress-bar progress-bar-fn\" style=\"width:7%;\" title=\"崭新出厂\" data-v-c03073cc></div><div class=\"progress-bar progress-bar-success\" style=\"width:8%;\" title=\"略有磨损\" data-v-c03073cc></div><div class=\"progress-bar progress-bar-warning\" style=\"width:23%;\" title=\"久经沙场\" data-v-c03073cc></div><div class=\"progress-bar progress-bar-danger\" style=\"width:7%;\" title=\"破损不堪\" data-v-c03073cc></div><div class=\"progress-bar progress-bar-bs\" style=\"width:55%;\" title=\"战痕累累\" data-v-c03073cc></div></div>", 1)
  1490. Object(external_Vue_["popScopeId"])()
  1491.  
  1492. const SkinInfovue_type_template_id_c03073cc_scoped_true_render = /*#__PURE__*/SkinInfovue_type_template_id_c03073cc_scoped_true_withId((_ctx, _cache, $props, $setup, $data, $options) => {
  1493. return (Object(external_Vue_["openBlock"])(), Object(external_Vue_["createBlock"])("div", SkinInfovue_type_template_id_c03073cc_scoped_true_hoisted_1, [
  1494. Object(external_Vue_["createVNode"])("div", SkinInfovue_type_template_id_c03073cc_scoped_true_hoisted_2, [
  1495. Object(external_Vue_["createVNode"])("img", { src: _ctx.imgUrl }, null, 8 /* PROPS */, ["src"]),
  1496. Object(external_Vue_["createVNode"])("a", {
  1497. href: "javascript:;",
  1498. class: "shalow-btn shalow-btn-green csgo-inspect-view view-btn",
  1499. "data-assetid": _ctx.assetid,
  1500. "data-inspecturl": _ctx.viewUrl,
  1501. "data-inspectversion": "10",
  1502. "data-inspectsize": "2560x3538",
  1503. "data-contextid": "2"
  1504. }, "检视图", 8 /* PROPS */, ["data-assetid", "data-inspecturl"])
  1505. ]),
  1506. Object(external_Vue_["createVNode"])("div", SkinInfovue_type_template_id_c03073cc_scoped_true_hoisted_3, [
  1507. Object(external_Vue_["createVNode"])("div", SkinInfovue_type_template_id_c03073cc_scoped_true_hoisted_4, Object(external_Vue_["toDisplayString"])(_ctx.skinName), 1 /* TEXT */),
  1508. Object(external_Vue_["createVNode"])("div", SkinInfovue_type_template_id_c03073cc_scoped_true_hoisted_5, "模板:" + Object(external_Vue_["toDisplayString"])(_ctx.skinSeed), 1 /* TEXT */),
  1509. Object(external_Vue_["createVNode"])("div", SkinInfovue_type_template_id_c03073cc_scoped_true_hoisted_6, "磨损:" + Object(external_Vue_["toDisplayString"])(_ctx.skinWear), 1 /* TEXT */),
  1510. Object(external_Vue_["createVNode"])("div", SkinInfovue_type_template_id_c03073cc_scoped_true_hoisted_7, [
  1511. Object(external_Vue_["createVNode"])("div", SkinInfovue_type_template_id_c03073cc_scoped_true_hoisted_8, [
  1512. Object(external_Vue_["createVNode"])("div", {
  1513. class: "wear-pointer-icon",
  1514. style: `left: ${Number(_ctx.skinWear*100)}%`
  1515. }, null, 4 /* STYLE */)
  1516. ]),
  1517. SkinInfovue_type_template_id_c03073cc_scoped_true_hoisted_9
  1518. ])
  1519. ])
  1520. ]))
  1521. })
  1522. // CONCATENATED MODULE: ./src/pages/buff/packages/CompareList/components/SkinInfo.vue?vue&type=template&id=c03073cc&scoped=true
  1523.  
  1524. // CONCATENATED MODULE: ./node_modules/vue-loader/dist??ref--8-0!./src/pages/buff/packages/CompareList/components/SkinInfo.vue?vue&type=script&lang=js
  1525.  
  1526.  
  1527. /* harmony default export */ var SkinInfovue_type_script_lang_js = (Object(external_Vue_["defineComponent"])({
  1528. props: [
  1529. "imgUrl", // 图片地址
  1530. "viewUrl", // 检视地址
  1531. "skinName", // 皮肤名
  1532. "skinWear", // 皮肤磨损
  1533. "skinSeed", // 皮肤模板
  1534. "assetid", // 皮肤id
  1535. ],
  1536. setup(props, ctx) {
  1537. return {
  1538. };
  1539. },
  1540. }));
  1541.  
  1542. // CONCATENATED MODULE: ./src/pages/buff/packages/CompareList/components/SkinInfo.vue?vue&type=script&lang=js
  1543. // EXTERNAL MODULE: ./src/pages/buff/packages/CompareList/components/SkinInfo.vue?vue&type=style&index=0&id=c03073cc&scoped=true&lang=css
  1544. var SkinInfovue_type_style_index_0_id_c03073cc_scoped_true_lang_css = __webpack_require__(13);
  1545.  
  1546. // CONCATENATED MODULE: ./src/pages/buff/packages/CompareList/components/SkinInfo.vue
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552. SkinInfovue_type_script_lang_js.render = SkinInfovue_type_template_id_c03073cc_scoped_true_render
  1553. SkinInfovue_type_script_lang_js.__scopeId = "data-v-c03073cc"
  1554.  
  1555. /* harmony default export */ var SkinInfo = (SkinInfovue_type_script_lang_js);
  1556. // CONCATENATED MODULE: ./node_modules/vue-loader/dist??ref--8-0!./src/pages/buff/packages/CompareList/views/CompareList.vue?vue&type=script&lang=js
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562. /* harmony default export */ var CompareListvue_type_script_lang_js = (Object(external_Vue_["defineComponent"])({
  1563. components: {
  1564. SkinInfo: SkinInfo
  1565. },
  1566. setup(props, ctx) {
  1567. let compareList = Object(external_Vue_["ref"])([]);
  1568. let checkedList = Object(external_Vue_["ref"])([]);
  1569.  
  1570. const updateCompareList = () => {
  1571. compareList.value = JSON.parse(GM_getValue("CompareList") || "[]") || [];
  1572. }
  1573.  
  1574. const onClickDelete = () => {
  1575. for (let i = 0; i < checkedList.value.length; i++) {
  1576. let item = checkedList.value[i];
  1577. let index = getIndexByAssetId(item);
  1578. // 删除元素
  1579. compareList.value.splice(index, 1);
  1580. }
  1581. checkedList.value.length = 0;
  1582. // 处理完后保存数据
  1583. GM_setValue("CompareList", JSON.stringify(compareList.value));
  1584. // 刷新列表
  1585. updateCompareList();
  1586. }
  1587.  
  1588. const onClickClear = () => {
  1589. if (confirm("是否全部删除?")) {
  1590. GM_setValue("CompareList", "[]");
  1591. updateCompareList();
  1592. showMessage("全部删除成功", "success");
  1593. }
  1594. }
  1595.  
  1596. const getIndexByAssetId = (assetid) => {
  1597. let ret = -1;
  1598. for (let i = 0; i < compareList.value.length; i++) {
  1599. let item = compareList.value[i];
  1600. if (item.assetid == assetid) {
  1601. ret = i;
  1602. break;
  1603. }
  1604. }
  1605. return ret;
  1606. }
  1607.  
  1608. const onClickCompare2d = () => {
  1609. if (checkedList.value.length == 2) {
  1610. // 判断是不是同类饰品
  1611. let compare2dData = [];
  1612. let textureNum = 0;
  1613. let isSame = true;
  1614. for (let i = 0; i < checkedList.value.length; i++) {
  1615. let item = checkedList.value[i];
  1616. let index = getIndexByAssetId(item);
  1617. if (i == 0) {
  1618. textureNum = compareList.value[index].textures.length;
  1619. } else if (compareList.value[index].textures.length !== textureNum) {
  1620. isSame = false;
  1621. break;
  1622. }
  1623. compare2dData.push(compareList.value[index]);
  1624. }
  1625.  
  1626. if (isSame) {
  1627. GM_setValue("CompareList_2D", JSON.stringify(compare2dData));
  1628. window.open("https://spect.fp.ps.netease.com/compare2d");
  1629. } else {
  1630. showMessage("【2D对比】请选择同类型的饰品", "error");
  1631. }
  1632. } else {
  1633. showMessage("【2D对比】请选择2项", "error");
  1634. }
  1635. }
  1636.  
  1637. const onClickCompare3d = () => {
  1638. if (checkedList.value.length > 9) {
  1639. showMessage("【3D对比】最多选择9项", "error");
  1640. return;
  1641. }
  1642. let compare3dData = [];
  1643. for (let i = 0; i < checkedList.value.length; i++) {
  1644. let item = checkedList.value[i];
  1645. let index = getIndexByAssetId(item);
  1646. compare3dData.push(compareList.value[index]);
  1647. }
  1648. GM_setValue("CompareList_3D", JSON.stringify(compare3dData));
  1649. window.open("https://buff.163.com/compare3d");
  1650. }
  1651.  
  1652. Object(external_Vue_["onMounted"])(() => {
  1653. updateCompareList();
  1654. })
  1655. return {
  1656. compareList,
  1657. checkedList,
  1658.  
  1659. onClickDelete, onClickCompare2d, onClickCompare3d, onClickClear
  1660. }
  1661. },
  1662. }));
  1663.  
  1664. // CONCATENATED MODULE: ./src/pages/buff/packages/CompareList/views/CompareList.vue?vue&type=script&lang=js
  1665. // EXTERNAL MODULE: ./src/pages/buff/packages/CompareList/views/CompareList.vue?vue&type=style&index=0&id=8a9384f8&scoped=true&lang=css
  1666. var CompareListvue_type_style_index_0_id_8a9384f8_scoped_true_lang_css = __webpack_require__(15);
  1667.  
  1668. // CONCATENATED MODULE: ./src/pages/buff/packages/CompareList/views/CompareList.vue
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674. CompareListvue_type_script_lang_js.render = render
  1675. CompareListvue_type_script_lang_js.__scopeId = "data-v-8a9384f8"
  1676.  
  1677. /* harmony default export */ var CompareList = (CompareListvue_type_script_lang_js);
  1678. // CONCATENATED MODULE: ./src/pages/buff/packages/CompareList/views/index.js
  1679.  
  1680.  
  1681.  
  1682. // EXTERNAL MODULE: ./src/pages/buff/packages/CompareList/styles/index.css
  1683. var CompareList_styles = __webpack_require__(17);
  1684.  
  1685. // CONCATENATED MODULE: ./src/pages/buff/packages/CompareList/index.js
  1686.  
  1687.  
  1688.  
  1689.  
  1690. function CompareList_init() {
  1691. CompareList_initDom();
  1692. CompareList_initFunc();
  1693. // createApp(CompareList).mount("#j_mybackpack");
  1694. }
  1695.  
  1696. function CompareList_initDom() {
  1697. let a = document.createElement("li");
  1698. a.className = "j_drop-handler";
  1699. a.id = "comparelist"
  1700. a.innerHTML = `<a href="javascript: void(0);"><strong>对比列表</strong></a> <i class="icon icon_new" style="display: none;"></i>`
  1701. let b = document.querySelector(".nav > ul");
  1702. b.appendChild(a);
  1703. }
  1704.  
  1705. function CompareList_initFunc() {
  1706. let body = document.body;
  1707. document.getElementById("comparelist").addEventListener("click", () => {
  1708. onClickCloseCompareList();
  1709. let a = document.createElement("div");
  1710. a.className = "compare__wrap";
  1711. a.style.width = `${body.offsetWidth}px`;
  1712. a.style.height = `${body.offsetHeight}px`;
  1713. a.innerHTML = `
  1714. <div class="compare__dialog" id="compare__app">
  1715. </div>
  1716. <div class="compare__mask"></div>
  1717. `
  1718. body.insertBefore(a, body.childNodes[0]);
  1719.  
  1720. document.getElementsByClassName("compare__mask")[0].addEventListener("click", () => {
  1721. onClickCloseCompareList();
  1722. });
  1723. let app = Object(external_Vue_["createApp"])(CompareList);
  1724. app.mount("#compare__app");
  1725. // createApp(CompareList).mount("#compare__app");
  1726. // createApp(CompareList).mount("#compare__app");
  1727. // console.log(JSON.parse(GM_getValue("CompareList") || "[]"))
  1728. });
  1729. }
  1730.  
  1731. function onClickCloseCompareList() {
  1732. let lastDom = document.getElementsByClassName("compare__wrap")[0];
  1733. if (lastDom) {
  1734. lastDom.remove();
  1735. }
  1736. }
  1737.  
  1738. /* harmony default export */ var packages_CompareList = ({
  1739. init: CompareList_init
  1740. });
  1741. // EXTERNAL MODULE: ./src/pages/buff/packages/Compare3D/styles/index.css
  1742. var Compare3D_styles = __webpack_require__(19);
  1743.  
  1744. // CONCATENATED MODULE: ./src/pages/buff/packages/Compare3D/index.js
  1745.  
  1746.  
  1747. // 1. 收集所有的模型iframe
  1748. // 2. 给每个iframe设置拖拽事件
  1749. // 3. 将事件传给父页面
  1750. // 4. 父页面将事件传递给其他的子页面
  1751.  
  1752. function Compare3D_init() {
  1753. clearDefaultHtml();
  1754. Compare3D_initDom();
  1755. initMessage(handleMessage);
  1756. Compare3D_initFunc();
  1757. }
  1758.  
  1759. function clearDefaultHtml() {
  1760. document.title = "CSGO饰品对比 - 3D";
  1761. document.body.innerHTML = "";
  1762. document.body.style.background = "";
  1763. document.querySelectorAll("link").forEach(item => item.remove())
  1764. }
  1765.  
  1766. function getModelLinks() {
  1767. let ret = [];
  1768. let data = JSON.parse(GM_getValue("CompareList_3D") || "[]") || [];
  1769. for (let i = 0; i < data.length; i++) {
  1770. let item = data[i];
  1771. ret.push("https://buff.163.com/3d_inspect/cs2?compare=true&assetid=" + item.assetid);
  1772. }
  1773. return ret;
  1774. }
  1775.  
  1776. function Compare3D_initDom() {
  1777. let links = getModelLinks();
  1778. let html = `
  1779. <div class="compare3d__tips">
  1780. <span>使用说明:</span>
  1781. <br/>
  1782. <span>1. 尽量以直线轨迹拖动,请勿按住来回拖动否则会不同步</span>
  1783. <br/>
  1784. <span>2. 按键盘1~9键可以快速切换模型</span>
  1785. <br/>
  1786. <span>3. 按回车键可让所有模型归位</span>
  1787. <br/>
  1788. <span>4. 请勿在F12下操作,否则会不同步</span>
  1789. <br/>
  1790. <span>5. 模型加载需要时间,请全部加载完再操作</span>
  1791. </div>
  1792. <div class="compare3d__watermark">
  1793. <span>--By 小淳</span>
  1794. </div>
  1795. `;
  1796. for (let i = 0; i < links.length; i++) {
  1797. // id用于锚点跳转
  1798. html += `<iframe id="model${i+1}" class="compare3d__iframe" src="${links[i]}&index=${i+1}"></iframe>`
  1799. }
  1800. let a = document.createElement("div");
  1801. a.className = "compare3d__wrap";
  1802. a.innerHTML = html;
  1803. document.body.appendChild(a);
  1804. }
  1805.  
  1806. function Compare3D_initFunc() {
  1807. // 父页面锚点快捷键实现
  1808. document.addEventListener("keydown", e => {
  1809. location.href = "https://buff.163.com/compare3d#model" + e.key;
  1810. })
  1811.  
  1812. document.getElementsByClassName("compare3d__watermark")[0].addEventListener("click", (e) => {
  1813. e.stopPropagation();
  1814. window.open("https://github.com/qianjiachun/csgo-skin-compare");
  1815. })
  1816.  
  1817. document.getElementsByClassName("compare3d__tips")[0].onclick = (e) => {
  1818. e.stopPropagation();
  1819. }
  1820. }
  1821.  
  1822. function initMessage(callback) {
  1823. window.addEventListener("message", (e) => {
  1824. callback(e.data);
  1825. })
  1826. }
  1827.  
  1828. function handleMessage(msg) {
  1829. let models = document.getElementsByClassName("compare3d__iframe");
  1830. switch (msg.cmd) {
  1831. case "keydown":
  1832. // iframe按下键盘,用于锚点跳转
  1833. if (msg.value == "Enter") {
  1834. // 重置
  1835. for (let i = 0; i < models.length; i++) {
  1836. postMessage(models[i].contentWindow, {
  1837. cmd: "reset",
  1838. value: 0
  1839. });
  1840. }
  1841. } else if (!isNaN(msg.value)) {
  1842. location.href = "https://buff.163.com/compare3d#model" + msg.value;
  1843. }
  1844. break;
  1845. case "rotate":
  1846. // 得到旋转信息,旋转其他的model
  1847. for (let i = 0; i < models.length; i++) {
  1848. if (Number(msg.index) !== i+1) {
  1849. // 排除自己
  1850. postMessage(models[i].contentWindow, {
  1851. cmd: "rotate",
  1852. value: msg.value
  1853. });
  1854. }
  1855. }
  1856. break;
  1857. default:
  1858. break;
  1859. }
  1860. }
  1861.  
  1862. function postMessage(dom, msg) {
  1863. dom.postMessage(msg);
  1864. }
  1865.  
  1866. /* harmony default export */ var Compare3D = ({
  1867. init: Compare3D_init
  1868. });
  1869. // CONCATENATED MODULE: ./src/pages/buff/packages/Inspect3D/index.js
  1870. // 每个iframe的子页面
  1871.  
  1872.  
  1873. let Inspect3D_index;
  1874.  
  1875. let isMouseDown = false;
  1876. let mouseDownInfo = {};
  1877. let mouseMoveInfo = {};
  1878.  
  1879. function Inspect3D_init() {
  1880. let t = setInterval(() => {
  1881. let canvas = document.querySelector("canvas");
  1882. if (canvas) {
  1883. clearInterval(t);
  1884. Inspect3D_index = getQueryString("index");
  1885. Inspect3D_initMessage(Inspect3D_handleMessage);
  1886. Inspect3D_initFunc();
  1887. }
  1888. }, 500);
  1889. }
  1890.  
  1891. function Inspect3D_initMessage(callback) {
  1892. window.addEventListener("message", e => {
  1893. callback(e.data);
  1894. })
  1895. }
  1896.  
  1897. function Inspect3D_handleMessage(msg) {
  1898. let dom = document.querySelector("canvas");
  1899. switch (msg.cmd) {
  1900. case "rotate":
  1901. setMouseMove(dom, msg.value.x, msg.value.y);
  1902. break;
  1903. case "reset":
  1904. buffManager.resetScene();
  1905. break;
  1906. default:
  1907. break;
  1908. }
  1909. }
  1910.  
  1911. function Inspect3D_initFunc() {
  1912. let dom = document.querySelector("canvas");
  1913.  
  1914. // 锚点切换
  1915. window.addEventListener("keydown", e => {
  1916. Inspect3D_postMessage({
  1917. cmd: "keydown",
  1918. value: e.key
  1919. })
  1920. })
  1921.  
  1922. // 鼠标拖拽
  1923. dom.addEventListener("mousedown", (e) => {
  1924. if (e.isMessage) {
  1925. return;
  1926. }
  1927. isMouseDown = true;
  1928. mouseDownInfo = {
  1929. x: e.pageX,
  1930. y: e.pageY
  1931. }
  1932. })
  1933.  
  1934. dom.addEventListener("mousemove", (e) => {
  1935. if (e.isMessage) {
  1936. return;
  1937. }
  1938. if (isMouseDown) {
  1939. mouseMoveInfo = {
  1940. x: e.pageX - mouseDownInfo.x,
  1941. y: e.pageY - mouseDownInfo.y
  1942. }
  1943. }
  1944. })
  1945.  
  1946. document.body.addEventListener("mouseup", (e) => {
  1947. if (e.isMessage) {
  1948. return;
  1949. }
  1950. console.log(mouseMoveInfo)
  1951. isMouseDown = false;
  1952. Inspect3D_postMessage({
  1953. cmd: "rotate",
  1954. index: Inspect3D_index,
  1955. value: mouseMoveInfo
  1956. });
  1957. })
  1958.  
  1959. document.getElementById("pc").onclick = (e) => {
  1960. // 阻止操作面板影响
  1961. e.stopPropagation();
  1962. }
  1963. }
  1964.  
  1965. function Inspect3D_postMessage(msg) {
  1966. window.parent.postMessage(msg);
  1967. }
  1968.  
  1969. /* harmony default export */ var Inspect3D = ({
  1970. init: Inspect3D_init
  1971. });
  1972. // EXTERNAL MODULE: ./src/pages/buff/packages/ShowTime/styles/index.css
  1973. var ShowTime_styles = __webpack_require__(21);
  1974.  
  1975. // CONCATENATED MODULE: ./src/pages/buff/packages/ShowTime/index.js
  1976.  
  1977.  
  1978.  
  1979. function ShowTime_init() {
  1980. let hasValidRes = false;
  1981. let timer = setInterval(() => {
  1982. for (let i = unsafeWindow.hookList.length - 1; i >= 0; i--) {
  1983. let item = unsafeWindow.hookList[i];
  1984. if (item.responseURL.includes("goods/sell_order")) {
  1985. clearInterval(timer);
  1986. hasValidRes = true;
  1987. break;
  1988. }
  1989. }
  1990. if (!hasValidRes) {
  1991. let marketShow = new unsafeWindow.marketShow();
  1992. marketShow.init();
  1993. return;
  1994. }
  1995. for (let i = unsafeWindow.hookList.length - 1; i >= 0; i--) {
  1996. let item = unsafeWindow.hookList[i];
  1997. if (item.responseURL.includes("goods/sell_order")) {
  1998. let data = JSON.parse(item.responseText);
  1999. insertDom(data.data.items)
  2000. break;
  2001. }
  2002. }
  2003. unsafeWindow.hookCallback = function (xhr) {
  2004. if (xhr.responseURL.includes("goods/sell_order")) {
  2005. let data = JSON.parse(xhr.responseText);
  2006. insertDom(data.data.items)
  2007. }
  2008. }
  2009. }, 500);
  2010. }
  2011.  
  2012. function insertDom(items) {
  2013. let sellings = document.querySelectorAll(".list_tb_csgo .selling");
  2014. for (let i = 0; i < sellings.length; i++) {
  2015. let itemData = items[i];
  2016. let id = sellings[i].id;
  2017. let t_Lefts = sellings[i].querySelectorAll(".t_Left");
  2018. let target = t_Lefts[t_Lefts.length - 1];
  2019. if (!target) continue;
  2020. if (!id.includes(itemData.id)) continue;
  2021. let div = document.createElement("div");
  2022. div.className = "ex-time";
  2023. div.innerHTML = `${itemData.created_at ? "<span>上架: " + dateFormat("yyyy-MM-dd hh:mm:ss",new Date(itemData.created_at * 1000)) + "</span>" : ""}
  2024. ${itemData.updated_at && itemData.created_at !== itemData.updated_at ? "<br/><span>更新: " + dateFormat("yyyy-MM-dd hh:mm:ss",new Date(itemData.updated_at * 1000)) + "</span>" : ""}`;
  2025. target.insertBefore(div, target.childNodes[0]);
  2026. }
  2027. }
  2028.  
  2029. /* harmony default export */ var ShowTime = ({
  2030. init: ShowTime_init
  2031. });
  2032. // CONCATENATED MODULE: ./src/pages/buff/packages/index.js
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039. function initPkg() {
  2040. if (location.href.indexOf("goods") !== -1) {
  2041. let timer = setInterval(() => {
  2042. if (document.getElementsByClassName("j_shoptip_handler").length > 0) {
  2043. if (unsafeWindow.hookList.length > 0) {
  2044. clearInterval(timer);
  2045. initMarket();
  2046. } else {
  2047. // 调用网页自身的请求实现拦截
  2048. let marketShow = new unsafeWindow.marketShow();
  2049. marketShow.init();
  2050. }
  2051. }
  2052. }, 300);
  2053. } else if (location.href.indexOf("compare3d") !== -1) {
  2054. initCompare3D();
  2055. } else if (location.href.indexOf("3d_inspect/cs2") !== -1) {
  2056. initInspect3D();
  2057. }
  2058. }
  2059.  
  2060. function initMarket() {
  2061. AddButton.init();
  2062. packages_CompareList.init();
  2063. ShowTime.init();
  2064. }
  2065.  
  2066. function initCompare3D() {
  2067. Compare3D.init();
  2068. }
  2069.  
  2070. function initInspect3D() {
  2071. Inspect3D.init();
  2072. }
  2073.  
  2074.  
  2075. // CONCATENATED MODULE: ./src/pages/buff/index.js
  2076.  
  2077.  
  2078.  
  2079. function beforeInit() {
  2080. }
  2081.  
  2082. function buff_init() {
  2083. beforeInit();
  2084. initPkg();
  2085. }
  2086.  
  2087. /* harmony default export */ var buff = ({
  2088. init: buff_init
  2089. });
  2090. // EXTERNAL MODULE: ./src/pages/spect/packages/Compare2D/styles/index.css
  2091. var Compare2D_styles = __webpack_require__(23);
  2092.  
  2093. // CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ref--5!./node_modules/vue-loader/dist??ref--8-0!./src/pages/spect/packages/Compare2D/views/Compare.vue?vue&type=template&id=23fa4444&scoped=true
  2094.  
  2095. const Comparevue_type_template_id_23fa4444_scoped_true_withId = /*#__PURE__*/Object(external_Vue_["withScopeId"])("data-v-23fa4444")
  2096.  
  2097. Object(external_Vue_["pushScopeId"])("data-v-23fa4444")
  2098. const Comparevue_type_template_id_23fa4444_scoped_true_hoisted_1 = { class: "panel" }
  2099. const Comparevue_type_template_id_23fa4444_scoped_true_hoisted_2 = { class: "panel__option" }
  2100. const Comparevue_type_template_id_23fa4444_scoped_true_hoisted_3 = /*#__PURE__*/Object(external_Vue_["createVNode"])("span", null, "明亮度:", -1 /* HOISTED */)
  2101. Object(external_Vue_["popScopeId"])()
  2102.  
  2103. const Comparevue_type_template_id_23fa4444_scoped_true_render = /*#__PURE__*/Comparevue_type_template_id_23fa4444_scoped_true_withId((_ctx, _cache, $props, $setup, $data, $options) => {
  2104. const _component_Slider = Object(external_Vue_["resolveComponent"])("Slider")
  2105.  
  2106. return (Object(external_Vue_["openBlock"])(), Object(external_Vue_["createBlock"])("div", {
  2107. class: "ComparisonSlider",
  2108. style: _ctx.styleWrap
  2109. }, [
  2110. Object(external_Vue_["createVNode"])("div", Comparevue_type_template_id_23fa4444_scoped_true_hoisted_1, [
  2111. Object(external_Vue_["createVNode"])("div", Comparevue_type_template_id_23fa4444_scoped_true_hoisted_2, [
  2112. Comparevue_type_template_id_23fa4444_scoped_true_hoisted_3,
  2113. Object(external_Vue_["createVNode"])(_component_Slider, {
  2114. class: "panel__slider",
  2115. modelValue: _ctx.brightnessValue,
  2116. "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (_ctx.brightnessValue = $event)),
  2117. tooltips: false,
  2118. max: 20,
  2119. step: -1,
  2120. onUpdate: _ctx.onUpdateSliderBrightness
  2121. }, null, 8 /* PROPS */, ["modelValue", "onUpdate"])
  2122. ])
  2123. ]),
  2124. Object(external_Vue_["createVNode"])("div", {
  2125. class: "ComparisonSlider__Before",
  2126. style: _ctx.styleBefore,
  2127. ref: "before"
  2128. }, null, 4 /* STYLE */),
  2129. Object(external_Vue_["createVNode"])("div", {
  2130. class: "ComparisonSlider__After",
  2131. style: _ctx.styleAfter,
  2132. ref: "after"
  2133. }, null, 4 /* STYLE */)
  2134. ], 4 /* STYLE */))
  2135. })
  2136. // CONCATENATED MODULE: ./src/pages/spect/packages/Compare2D/views/Compare.vue?vue&type=template&id=23fa4444&scoped=true
  2137.  
  2138. // EXTERNAL MODULE: external "VueformSlider"
  2139. var external_VueformSlider_ = __webpack_require__(3);
  2140. var external_VueformSlider_default = /*#__PURE__*/__webpack_require__.n(external_VueformSlider_);
  2141.  
  2142. // CONCATENATED MODULE: ./node_modules/vue-loader/dist??ref--8-0!./src/pages/spect/packages/Compare2D/views/Compare.vue?vue&type=script&lang=js
  2143.  
  2144.  
  2145.  
  2146. // const Slider = require('@vueform/slider')
  2147. /* harmony default export */ var Comparevue_type_script_lang_js = (Object(external_Vue_["defineComponent"])({
  2148. components: {
  2149. Slider: external_VueformSlider_default.a
  2150. },
  2151. setup(props, ctx) {
  2152. let brightnessValue = Object(external_Vue_["ref"])(1);
  2153. let {proxy} = Object(external_Vue_["getCurrentInstance"])();
  2154. let img1 = proxy.img1;
  2155. let img2 = proxy.img2;
  2156. let styleBefore = Object(external_Vue_["ref"])("");
  2157. let styleAfter = Object(external_Vue_["ref"])("");
  2158. let styleWrap = Object(external_Vue_["ref"])("");
  2159.  
  2160. let before = Object(external_Vue_["ref"])(null);
  2161. let after = Object(external_Vue_["ref"])(null);
  2162.  
  2163. const onUpdateSliderBrightness = (v) => {
  2164. before.value.style.filter = `brightness(${v})`;
  2165. after.value.style.filter = `brightness(${v})`;
  2166. }
  2167.  
  2168. Object(external_Vue_["onMounted"])(() => {
  2169. let img = new Image();
  2170. img.src = img1
  2171. img.onload = () => {
  2172. let ratio = img.height / img.width;
  2173. let width = document.getElementById("app").clientWidth;
  2174. let height = width * ratio;
  2175. document.getElementsByClassName("menu")[0].style.height = `${height}px`;
  2176. styleWrap.value = `width:${width}px;height:${height}px;`
  2177. styleBefore.value = `background-image: url(${img1})`;
  2178. styleAfter.value = `background-image: url(${img2})`;
  2179. Object(external_Vue_["nextTick"])(() => {
  2180. const comparisonSlider = new ComparisonSlider();
  2181. })
  2182. }
  2183. })
  2184. return {
  2185. before,after,
  2186. onUpdateSliderBrightness,
  2187. styleBefore,
  2188. styleAfter,
  2189. styleWrap,
  2190. brightnessValue
  2191. };
  2192. },
  2193. }));
  2194.  
  2195. // CONCATENATED MODULE: ./src/pages/spect/packages/Compare2D/views/Compare.vue?vue&type=script&lang=js
  2196. // EXTERNAL MODULE: ./src/pages/spect/packages/Compare2D/views/Compare.vue?vue&type=style&index=0&id=23fa4444&scoped=true&lang=css
  2197. var Comparevue_type_style_index_0_id_23fa4444_scoped_true_lang_css = __webpack_require__(25);
  2198.  
  2199. // CONCATENATED MODULE: ./src/pages/spect/packages/Compare2D/views/Compare.vue
  2200.  
  2201.  
  2202.  
  2203.  
  2204.  
  2205. Comparevue_type_script_lang_js.render = Comparevue_type_template_id_23fa4444_scoped_true_render
  2206. Comparevue_type_script_lang_js.__scopeId = "data-v-23fa4444"
  2207.  
  2208. /* harmony default export */ var Compare = (Comparevue_type_script_lang_js);
  2209. // CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ref--5!./node_modules/vue-loader/dist??ref--8-0!./src/pages/spect/packages/Compare2D/views/Diff.vue?vue&type=template&id=45eea504&scoped=true
  2210.  
  2211. const Diffvue_type_template_id_45eea504_scoped_true_withId = /*#__PURE__*/Object(external_Vue_["withScopeId"])("data-v-45eea504")
  2212.  
  2213. Object(external_Vue_["pushScopeId"])("data-v-45eea504")
  2214. const Diffvue_type_template_id_45eea504_scoped_true_hoisted_1 = { class: "panel" }
  2215. const Diffvue_type_template_id_45eea504_scoped_true_hoisted_2 = { class: "panel__option" }
  2216. const Diffvue_type_template_id_45eea504_scoped_true_hoisted_3 = /*#__PURE__*/Object(external_Vue_["createVNode"])("span", null, "明亮度:", -1 /* HOISTED */)
  2217. const Diffvue_type_template_id_45eea504_scoped_true_hoisted_4 = { class: "panel__option" }
  2218. const Diffvue_type_template_id_45eea504_scoped_true_hoisted_5 = /*#__PURE__*/Object(external_Vue_["createVNode"])("span", null, "分辨率:", -1 /* HOISTED */)
  2219. const Diffvue_type_template_id_45eea504_scoped_true_hoisted_6 = { class: "panel__option" }
  2220. const Diffvue_type_template_id_45eea504_scoped_true_hoisted_7 = /*#__PURE__*/Object(external_Vue_["createVNode"])("span", { style: {"margin-right":"16px"} }, "阈值:", -1 /* HOISTED */)
  2221. const Diffvue_type_template_id_45eea504_scoped_true_hoisted_8 = {
  2222. style: {"filter":"brightness(10)"},
  2223. ref: "canvas1"
  2224. }
  2225. Object(external_Vue_["popScopeId"])()
  2226.  
  2227. const Diffvue_type_template_id_45eea504_scoped_true_render = /*#__PURE__*/Diffvue_type_template_id_45eea504_scoped_true_withId((_ctx, _cache, $props, $setup, $data, $options) => {
  2228. const _component_Slider = Object(external_Vue_["resolveComponent"])("Slider")
  2229.  
  2230. return (Object(external_Vue_["openBlock"])(), Object(external_Vue_["createBlock"])("div", null, [
  2231. Object(external_Vue_["createVNode"])("div", Diffvue_type_template_id_45eea504_scoped_true_hoisted_1, [
  2232. Object(external_Vue_["createVNode"])("div", Diffvue_type_template_id_45eea504_scoped_true_hoisted_2, [
  2233. Diffvue_type_template_id_45eea504_scoped_true_hoisted_3,
  2234. Object(external_Vue_["createVNode"])(_component_Slider, {
  2235. class: "panel__slider",
  2236. modelValue: _ctx.brightnessValue,
  2237. "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (_ctx.brightnessValue = $event)),
  2238. tooltips: false,
  2239. max: 20,
  2240. step: -1,
  2241. onUpdate: _ctx.onUpdateSliderBrightness
  2242. }, null, 8 /* PROPS */, ["modelValue", "onUpdate"])
  2243. ]),
  2244. Object(external_Vue_["createVNode"])("div", Diffvue_type_template_id_45eea504_scoped_true_hoisted_4, [
  2245. Diffvue_type_template_id_45eea504_scoped_true_hoisted_5,
  2246. Object(external_Vue_["createVNode"])(_component_Slider, {
  2247. class: "panel__slider",
  2248. modelValue: _ctx.resolutionValue,
  2249. "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => (_ctx.resolutionValue = $event)),
  2250. tooltips: false,
  2251. max: 1,
  2252. step: -1,
  2253. onChange: _ctx.onUpdateSliderResolution
  2254. }, null, 8 /* PROPS */, ["modelValue", "onChange"])
  2255. ]),
  2256. Object(external_Vue_["createVNode"])("div", Diffvue_type_template_id_45eea504_scoped_true_hoisted_6, [
  2257. Diffvue_type_template_id_45eea504_scoped_true_hoisted_7,
  2258. Object(external_Vue_["createVNode"])(_component_Slider, {
  2259. class: "panel__slider",
  2260. modelValue: _ctx.thresholdValue,
  2261. "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => (_ctx.thresholdValue = $event)),
  2262. tooltips: false,
  2263. max: 70,
  2264. onChange: _ctx.onUpdateSliderThreshold
  2265. }, null, 8 /* PROPS */, ["modelValue", "onChange"])
  2266. ])
  2267. ]),
  2268. Object(external_Vue_["createVNode"])("div", Diffvue_type_template_id_45eea504_scoped_true_hoisted_8, null, 512 /* NEED_PATCH */)
  2269. ]))
  2270. })
  2271. // CONCATENATED MODULE: ./src/pages/spect/packages/Compare2D/views/Diff.vue?vue&type=template&id=45eea504&scoped=true
  2272.  
  2273. // CONCATENATED MODULE: ./node_modules/vue-loader/dist??ref--8-0!./src/pages/spect/packages/Compare2D/views/Diff.vue?vue&type=script&lang=js
  2274.  
  2275.  
  2276.  
  2277.  
  2278. // const Slider = require('@vueform/slider')
  2279. /* harmony default export */ var Diffvue_type_script_lang_js = (Object(external_Vue_["defineComponent"])({
  2280. components: {
  2281. Slider: external_VueformSlider_default.a
  2282. },
  2283. setup(props, ctx) {
  2284. let brightnessValue = Object(external_Vue_["ref"])(10);
  2285. let resolutionValue = Object(external_Vue_["ref"])(1);
  2286. let thresholdValue = Object(external_Vue_["ref"])(0);
  2287. let {proxy} = Object(external_Vue_["getCurrentInstance"])();
  2288. let img1Url = proxy.img1;
  2289. let img2Url = proxy.img2;
  2290. let img1 = Object(external_Vue_["ref"])(null);
  2291. let img2 = Object(external_Vue_["ref"])(null);
  2292. let canvas1 = Object(external_Vue_["ref"])(null);
  2293. let imgDom = null;
  2294. let ratio = 0;
  2295. let params = Object(external_Vue_["ref"])({
  2296. baseImageUrl: "",
  2297. targetImageUrl: "",
  2298. resolution: 1, // 0.01..1, optional, defaults to 1
  2299. threshold: 0, // 0..255, optional, defaults to 0
  2300. isNormalized: false // Boolean, optional, defaults to false
  2301. })
  2302.  
  2303. const onUpdateSliderBrightness = (v) => {
  2304. canvas1.value.style.filter = `brightness(${v})`;
  2305. }
  2306.  
  2307. const onUpdateSliderResolution = (v) => {
  2308. let obj = params.value;
  2309. obj.resolution = v;
  2310. updateDiffImg(obj);
  2311. }
  2312.  
  2313. const onUpdateSliderThreshold = (v) => {
  2314. let obj = params.value;
  2315. obj.threshold = v;
  2316. updateDiffImg(obj);
  2317. }
  2318.  
  2319. const updateDiffImg = (option) => {
  2320. showMessage("图片加载中...", "info");
  2321. params.value = option;
  2322. const promiseCompare = canvasCompare(params.value);
  2323.  
  2324. promiseCompare.then(function (result) {
  2325. // Do things with result
  2326. if (imgDom) {
  2327. canvas1.value.removeChild(imgDom);
  2328. }
  2329. imgDom = result.producePreview();
  2330. imgDom.width = document.getElementById("app").clientWidth;
  2331. imgDom.height = imgDom.width * ratio;
  2332. canvas1.value.appendChild(imgDom);
  2333. });
  2334. }
  2335.  
  2336. const renderDiffImg = () => {
  2337. let img = new Image();
  2338. img.src = img1.value;
  2339. img.onload = () => {
  2340. ratio = img.height / img.width;
  2341. document.getElementsByClassName("menu")[0].style.height = document.getElementById("app").clientWidth * ratio + "px";
  2342. Object(external_Vue_["nextTick"])(() => {
  2343. updateDiffImg(params.value);
  2344. })
  2345. }
  2346. }
  2347.  
  2348. Object(external_Vue_["onMounted"])(() => {
  2349. // return
  2350. let img1Finished = false;
  2351. let img2Finished = false;
  2352. getBase64(img1Url, (base64) => {
  2353. img1.value = base64;
  2354. params.value.baseImageUrl = img1.value;
  2355. img1Finished = true;
  2356. if (img2Finished) {
  2357. renderDiffImg();
  2358. }
  2359. })
  2360. getBase64(img2Url, (base64) => {
  2361. img2.value = base64;
  2362. params.value.targetImageUrl = img2.value;
  2363. img2Finished = true;
  2364. if (img1Finished) {
  2365. renderDiffImg();
  2366. }
  2367. })
  2368. })
  2369. return {
  2370. canvas1,
  2371. brightnessValue,resolutionValue,thresholdValue,
  2372. onUpdateSliderBrightness,onUpdateSliderResolution,onUpdateSliderThreshold
  2373. };
  2374. },
  2375. }));
  2376.  
  2377. // CONCATENATED MODULE: ./src/pages/spect/packages/Compare2D/views/Diff.vue?vue&type=script&lang=js
  2378. // EXTERNAL MODULE: ./node_modules/@vueform/slider/themes/default.css?vue&type=style&index=0&lang=css
  2379. var defaultvue_type_style_index_0_lang_css = __webpack_require__(27);
  2380.  
  2381. // EXTERNAL MODULE: ./src/pages/spect/packages/Compare2D/views/Diff.vue?vue&type=style&index=1&id=45eea504&scoped=true&lang=css
  2382. var Diffvue_type_style_index_1_id_45eea504_scoped_true_lang_css = __webpack_require__(29);
  2383.  
  2384. // CONCATENATED MODULE: ./src/pages/spect/packages/Compare2D/views/Diff.vue
  2385.  
  2386.  
  2387.  
  2388.  
  2389.  
  2390.  
  2391. Diffvue_type_script_lang_js.render = Diffvue_type_template_id_45eea504_scoped_true_render
  2392. Diffvue_type_script_lang_js.__scopeId = "data-v-45eea504"
  2393.  
  2394. /* harmony default export */ var Diff = (Diffvue_type_script_lang_js);
  2395. // CONCATENATED MODULE: ./src/pages/spect/packages/Compare2D/views/index.js
  2396.  
  2397.  
  2398.  
  2399.  
  2400. // CONCATENATED MODULE: ./src/pages/spect/packages/Compare2D/index.js
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406. let Compare2D_compareList = JSON.parse(GM_getValue("CompareList_2D") || "[]") || [];
  2407. let Compare2D_app;
  2408.  
  2409. function Compare2D_init() {
  2410. Compare2D_initDom();
  2411. initDom_Menu();
  2412. Compare2D_initFunc();
  2413. }
  2414.  
  2415. function Compare2D_initDom() {
  2416. let a = document.createElement("div");
  2417. a.className = "wrap";
  2418. a.innerHTML = `
  2419. <div class="compare2d__watermark">
  2420. <span>--By 小淳</span>
  2421. </div>
  2422. <div class="skin1-info">
  2423. <span>${Compare2D_compareList[0].name}</span>
  2424. <br/>
  2425. <span>模板:${Compare2D_compareList[0].asset_info.paintseed}</span>
  2426. <br/>
  2427. <span>磨损:${Compare2D_compareList[0].asset_info.paintwear}</span>
  2428. </div>
  2429. <div class="skin2-info">
  2430. <span>${Compare2D_compareList[1].name}</span>
  2431. <br/>
  2432. <span>模板:${Compare2D_compareList[1].asset_info.paintseed}</span>
  2433. <br/>
  2434. <span>磨损:${Compare2D_compareList[1].asset_info.paintwear}</span>
  2435. </div>
  2436. <div class="menu">
  2437. <div class="menu__title">饰品2D对比</div>
  2438. <div class="menu__sub">
  2439. <div class="sub__view">
  2440. <div class="view__title pdl-10">检视图</div>
  2441. <div class="view__content">
  2442. <div class="view__item pdl-20" id="view__compare">【检视图】对比</div>
  2443. <div class="view__item pdl-20" id="view__diff">【检视图】差异</div>
  2444. </div>
  2445. </div>
  2446.  
  2447. <div class="sub__texture">
  2448. <div class="texture__title pdl-10">纹理图</div>
  2449. <div class="texture__content">
  2450.  
  2451. </div>
  2452. </div>
  2453. </div>
  2454. </div>
  2455.  
  2456. <div class="view" id="app">
  2457.  
  2458. </div>
  2459. `
  2460. let b = document.body;
  2461. b.appendChild(a);
  2462. }
  2463.  
  2464. function initDom_Menu() {
  2465. let html_texture = ""; // 纹理图html
  2466. let dom = document.getElementsByClassName("texture__content")[0];
  2467.  
  2468. for (let i = 0; i < Compare2D_compareList[0].textures.length; i++) {
  2469. // 纹理图
  2470. html_texture += `
  2471. <div class="texture__item pdl-20 texture__compare" id="texture__compare${i}">【纹理图${i+1}】对比</div>
  2472. <div class="texture__item pdl-20 texture__diff" id="texture__diff${i}">【纹理图${i+1}】差异</div>
  2473. `
  2474. }
  2475. dom.innerHTML = html_texture;
  2476. }
  2477.  
  2478. function Compare2D_initFunc() {
  2479. let views = document.getElementsByClassName("view__item");
  2480. let textures = document.getElementsByClassName("texture__item");
  2481. // active事件
  2482. for (let i = 0; i < views.length; i++) {
  2483. views[i].addEventListener("click", () => {
  2484. for (let j = 0; j < views.length; j++) {
  2485. views[j].className = views[j].className.replace(" is-active", "");
  2486. }
  2487. for (let j = 0; j < textures.length; j++) {
  2488. textures[j].className = textures[j].className.replace(" is-active", "");
  2489. }
  2490. views[i].className += " is-active";
  2491. })
  2492. }
  2493.  
  2494. for (let i = 0; i < textures.length; i++) {
  2495. textures[i].addEventListener("click", () => {
  2496. for (let j = 0; j < views.length; j++) {
  2497. views[j].className = views[j].className.replace(" is-active", "");
  2498. }
  2499. for (let j = 0; j < textures.length; j++) {
  2500. textures[j].className = textures[j].className.replace(" is-active", "");
  2501. }
  2502. textures[i].className += " is-active";
  2503. })
  2504. }
  2505.  
  2506. // 业务事件
  2507. document.getElementById("view__compare").addEventListener("click", () => {
  2508. // 检视图对比
  2509. if (Compare2D_app) Compare2D_app.unmount();
  2510. let img1 = Compare2D_compareList[0].inspectUrl;
  2511. let img2 = Compare2D_compareList[1].inspectUrl;
  2512. Compare2D_app = Object(external_Vue_["createApp"])(Compare);
  2513. Compare2D_app.config.globalProperties.img1 = img1;
  2514. Compare2D_app.config.globalProperties.img2 = img2;
  2515. Compare2D_app.mount("#app");
  2516. })
  2517. document.getElementById("view__diff").addEventListener("click", () => {
  2518. // 检视图差异
  2519. if (Compare2D_app) Compare2D_app.unmount();
  2520. let img1 = Compare2D_compareList[0].inspectUrl;
  2521. let img2 = Compare2D_compareList[1].inspectUrl;
  2522. Compare2D_app = Object(external_Vue_["createApp"])(Diff);
  2523. Compare2D_app.config.globalProperties.img1 = img1;
  2524. Compare2D_app.config.globalProperties.img2 = img2;
  2525. Compare2D_app.mount("#app");
  2526. })
  2527.  
  2528. let texture_compare = document.getElementsByClassName("texture__compare");
  2529. let texture_diff = document.getElementsByClassName("texture__diff");
  2530.  
  2531. for (let i = 0; i < texture_compare.length; i++) {
  2532. let item = texture_compare[i];
  2533. item.addEventListener("click", () => {
  2534. // 纹理图对比
  2535. if (Compare2D_app) Compare2D_app.unmount();
  2536. let img1 = Compare2D_compareList[0].textures[i].url;
  2537. let img2 = Compare2D_compareList[1].textures[i].url;
  2538. Compare2D_app = Object(external_Vue_["createApp"])(Compare);
  2539. Compare2D_app.config.globalProperties.img1 = img1;
  2540. Compare2D_app.config.globalProperties.img2 = img2;
  2541. Compare2D_app.mount("#app");
  2542. })
  2543. }
  2544.  
  2545. for (let i = 0; i < texture_diff.length; i++) {
  2546. let item = texture_diff[i];
  2547. item.addEventListener("click", () => {
  2548. // 纹理图差异
  2549. if (Compare2D_app) Compare2D_app.unmount();
  2550. let img1 = Compare2D_compareList[0].textures[i].url;
  2551. let img2 = Compare2D_compareList[1].textures[i].url;
  2552. Compare2D_app = Object(external_Vue_["createApp"])(Diff);
  2553. Compare2D_app.config.globalProperties.img1 = img1;
  2554. Compare2D_app.config.globalProperties.img2 = img2;
  2555. Compare2D_app.mount("#app");
  2556. })
  2557. }
  2558.  
  2559. document.getElementsByClassName("compare2d__watermark")[0].addEventListener("click", () => {
  2560. window.open("https://github.com/qianjiachun/csgo-skin-compare");
  2561. })
  2562. }
  2563.  
  2564.  
  2565. /* harmony default export */ var Compare2D = ({
  2566. init: Compare2D_init
  2567. });
  2568. // CONCATENATED MODULE: ./src/pages/spect/packages/index.js
  2569.  
  2570.  
  2571. function packages_initPkg() {
  2572. Compare2D.init();
  2573. }
  2574.  
  2575.  
  2576. // CONCATENATED MODULE: ./src/pages/spect/index.js
  2577.  
  2578.  
  2579. function spect_beforeInit() {
  2580. // 清除页面默认数据
  2581. document.title = "CSGO饰品对比 - 2D";
  2582. document.body.innerHTML = "";
  2583. }
  2584.  
  2585. function spect_init() {
  2586. spect_beforeInit();
  2587. packages_initPkg();
  2588. }
  2589.  
  2590. /* harmony default export */ var spect = ({
  2591. init: spect_init
  2592. });
  2593. // CONCATENATED MODULE: ./src/pages/index.js
  2594. // import www from "./www"
  2595.  
  2596.  
  2597. /* harmony default export */ var pages = ({
  2598. // www
  2599. buff: buff,
  2600. spect: spect
  2601. });
  2602. // CONCATENATED MODULE: ./src/router.js
  2603.  
  2604.  
  2605. function initRouter() {
  2606. // 根据需求判断location对象的值,来选择使用哪个page
  2607. if (location.href.indexOf("buff") !== -1) {
  2608. pages.buff.init();
  2609. }
  2610.  
  2611. if (location.href.indexOf("spect") !== -1) {
  2612. if (location.href.indexOf("compare2d") !== -1) {
  2613. pages.spect.init();
  2614. }
  2615. }
  2616. }
  2617.  
  2618. // CONCATENATED MODULE: ./src/main.js
  2619.  
  2620. initRouter();
  2621.  
  2622.  
  2623. /***/ })
  2624. /******/ ]);
  2625. //# sourceMappingURL=main.js.map

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址