├── .gitee └── ISSUE_TEMPLATE.zh-CN.md ├── LICENSE ├── buffMarketHelper.user.js └── readme.md /.gitee/ISSUE_TEMPLATE.zh-CN.md: -------------------------------------------------------------------------------- 1 | > 加入 QQ 群 544144372 可直接与作者沟通 2 | ### 请描述你遇到的问题: 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU AFFERO GENERAL PUBLIC LICENSE 2 | Version 3, 19 November 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU Affero General Public License is a free, copyleft license for 11 | software and other kinds of works, specifically designed to ensure 12 | cooperation with the community in the case of network server software. 13 | 14 | The licenses for most software and other practical works are designed 15 | to take away your freedom to share and change the works. By contrast, 16 | our General Public Licenses are intended to guarantee your freedom to 17 | share and change all versions of a program--to make sure it remains free 18 | software for all its users. 19 | 20 | When we speak of free software, we are referring to freedom, not 21 | price. Our General Public Licenses are designed to make sure that you 22 | have the freedom to distribute copies of free software (and charge for 23 | them if you wish), that you receive source code or can get it if you 24 | want it, that you can change the software or use pieces of it in new 25 | free programs, and that you know you can do these things. 26 | 27 | Developers that use our General Public Licenses protect your rights 28 | with two steps: (1) assert copyright on the software, and (2) offer 29 | you this License which gives you legal permission to copy, distribute 30 | and/or modify the software. 31 | 32 | A secondary benefit of defending all users' freedom is that 33 | improvements made in alternate versions of the program, if they 34 | receive widespread use, become available for other developers to 35 | incorporate. Many developers of free software are heartened and 36 | encouraged by the resulting cooperation. However, in the case of 37 | software used on network servers, this result may fail to come about. 38 | The GNU General Public License permits making a modified version and 39 | letting the public access it on a server without ever releasing its 40 | source code to the public. 41 | 42 | The GNU Affero General Public License is designed specifically to 43 | ensure that, in such cases, the modified source code becomes available 44 | to the community. It requires the operator of a network server to 45 | provide the source code of the modified version running there to the 46 | users of that server. Therefore, public use of a modified version, on 47 | a publicly accessible server, gives the public access to the source 48 | code of the modified version. 49 | 50 | An older license, called the Affero General Public License and 51 | published by Affero, was designed to accomplish similar goals. This is 52 | a different license, not a version of the Affero GPL, but Affero has 53 | released a new version of the Affero GPL which permits relicensing under 54 | this license. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | TERMS AND CONDITIONS 60 | 61 | 0. Definitions. 62 | 63 | "This License" refers to version 3 of the GNU Affero General Public License. 64 | 65 | "Copyright" also means copyright-like laws that apply to other kinds of 66 | works, such as semiconductor masks. 67 | 68 | "The Program" refers to any copyrightable work licensed under this 69 | License. Each licensee is addressed as "you". "Licensees" and 70 | "recipients" may be individuals or organizations. 71 | 72 | To "modify" a work means to copy from or adapt all or part of the work 73 | in a fashion requiring copyright permission, other than the making of an 74 | exact copy. The resulting work is called a "modified version" of the 75 | earlier work or a work "based on" the earlier work. 76 | 77 | A "covered work" means either the unmodified Program or a work based 78 | on the Program. 79 | 80 | To "propagate" a work means to do anything with it that, without 81 | permission, would make you directly or secondarily liable for 82 | infringement under applicable copyright law, except executing it on a 83 | computer or modifying a private copy. Propagation includes copying, 84 | distribution (with or without modification), making available to the 85 | public, and in some countries other activities as well. 86 | 87 | To "convey" a work means any kind of propagation that enables other 88 | parties to make or receive copies. Mere interaction with a user through 89 | a computer network, with no transfer of a copy, is not conveying. 90 | 91 | An interactive user interface displays "Appropriate Legal Notices" 92 | to the extent that it includes a convenient and prominently visible 93 | feature that (1) displays an appropriate copyright notice, and (2) 94 | tells the user that there is no warranty for the work (except to the 95 | extent that warranties are provided), that licensees may convey the 96 | work under this License, and how to view a copy of this License. If 97 | the interface presents a list of user commands or options, such as a 98 | menu, a prominent item in the list meets this criterion. 99 | 100 | 1. Source Code. 101 | 102 | The "source code" for a work means the preferred form of the work 103 | for making modifications to it. "Object code" means any non-source 104 | form of a work. 105 | 106 | A "Standard Interface" means an interface that either is an official 107 | standard defined by a recognized standards body, or, in the case of 108 | interfaces specified for a particular programming language, one that 109 | is widely used among developers working in that language. 110 | 111 | The "System Libraries" of an executable work include anything, other 112 | than the work as a whole, that (a) is included in the normal form of 113 | packaging a Major Component, but which is not part of that Major 114 | Component, and (b) serves only to enable use of the work with that 115 | Major Component, or to implement a Standard Interface for which an 116 | implementation is available to the public in source code form. A 117 | "Major Component", in this context, means a major essential component 118 | (kernel, window system, and so on) of the specific operating system 119 | (if any) on which the executable work runs, or a compiler used to 120 | produce the work, or an object code interpreter used to run it. 121 | 122 | The "Corresponding Source" for a work in object code form means all 123 | the source code needed to generate, install, and (for an executable 124 | work) run the object code and to modify the work, including scripts to 125 | control those activities. However, it does not include the work's 126 | System Libraries, or general-purpose tools or generally available free 127 | programs which are used unmodified in performing those activities but 128 | which are not part of the work. For example, Corresponding Source 129 | includes interface definition files associated with source files for 130 | the work, and the source code for shared libraries and dynamically 131 | linked subprograms that the work is specifically designed to require, 132 | such as by intimate data communication or control flow between those 133 | subprograms and other parts of the work. 134 | 135 | The Corresponding Source need not include anything that users 136 | can regenerate automatically from other parts of the Corresponding 137 | Source. 138 | 139 | The Corresponding Source for a work in source code form is that 140 | same work. 141 | 142 | 2. Basic Permissions. 143 | 144 | All rights granted under this License are granted for the term of 145 | copyright on the Program, and are irrevocable provided the stated 146 | conditions are met. This License explicitly affirms your unlimited 147 | permission to run the unmodified Program. The output from running a 148 | covered work is covered by this License only if the output, given its 149 | content, constitutes a covered work. This License acknowledges your 150 | rights of fair use or other equivalent, as provided by copyright law. 151 | 152 | You may make, run and propagate covered works that you do not 153 | convey, without conditions so long as your license otherwise remains 154 | in force. You may convey covered works to others for the sole purpose 155 | of having them make modifications exclusively for you, or provide you 156 | with facilities for running those works, provided that you comply with 157 | the terms of this License in conveying all material for which you do 158 | not control copyright. Those thus making or running the covered works 159 | for you must do so exclusively on your behalf, under your direction 160 | and control, on terms that prohibit them from making any copies of 161 | your copyrighted material outside their relationship with you. 162 | 163 | Conveying under any other circumstances is permitted solely under 164 | the conditions stated below. Sublicensing is not allowed; section 10 165 | makes it unnecessary. 166 | 167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 168 | 169 | No covered work shall be deemed part of an effective technological 170 | measure under any applicable law fulfilling obligations under article 171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 172 | similar laws prohibiting or restricting circumvention of such 173 | measures. 174 | 175 | When you convey a covered work, you waive any legal power to forbid 176 | circumvention of technological measures to the extent such circumvention 177 | is effected by exercising rights under this License with respect to 178 | the covered work, and you disclaim any intention to limit operation or 179 | modification of the work as a means of enforcing, against the work's 180 | users, your or third parties' legal rights to forbid circumvention of 181 | technological measures. 182 | 183 | 4. Conveying Verbatim Copies. 184 | 185 | You may convey verbatim copies of the Program's source code as you 186 | receive it, in any medium, provided that you conspicuously and 187 | appropriately publish on each copy an appropriate copyright notice; 188 | keep intact all notices stating that this License and any 189 | non-permissive terms added in accord with section 7 apply to the code; 190 | keep intact all notices of the absence of any warranty; and give all 191 | recipients a copy of this License along with the Program. 192 | 193 | You may charge any price or no price for each copy that you convey, 194 | and you may offer support or warranty protection for a fee. 195 | 196 | 5. Conveying Modified Source Versions. 197 | 198 | You may convey a work based on the Program, or the modifications to 199 | produce it from the Program, in the form of source code under the 200 | terms of section 4, provided that you also meet all of these conditions: 201 | 202 | a) The work must carry prominent notices stating that you modified 203 | it, and giving a relevant date. 204 | 205 | b) The work must carry prominent notices stating that it is 206 | released under this License and any conditions added under section 207 | 7. This requirement modifies the requirement in section 4 to 208 | "keep intact all notices". 209 | 210 | c) You must license the entire work, as a whole, under this 211 | License to anyone who comes into possession of a copy. This 212 | License will therefore apply, along with any applicable section 7 213 | additional terms, to the whole of the work, and all its parts, 214 | regardless of how they are packaged. This License gives no 215 | permission to license the work in any other way, but it does not 216 | invalidate such permission if you have separately received it. 217 | 218 | d) If the work has interactive user interfaces, each must display 219 | Appropriate Legal Notices; however, if the Program has interactive 220 | interfaces that do not display Appropriate Legal Notices, your 221 | work need not make them do so. 222 | 223 | A compilation of a covered work with other separate and independent 224 | works, which are not by their nature extensions of the covered work, 225 | and which are not combined with it such as to form a larger program, 226 | in or on a volume of a storage or distribution medium, is called an 227 | "aggregate" if the compilation and its resulting copyright are not 228 | used to limit the access or legal rights of the compilation's users 229 | beyond what the individual works permit. Inclusion of a covered work 230 | in an aggregate does not cause this License to apply to the other 231 | parts of the aggregate. 232 | 233 | 6. Conveying Non-Source Forms. 234 | 235 | You may convey a covered work in object code form under the terms 236 | of sections 4 and 5, provided that you also convey the 237 | machine-readable Corresponding Source under the terms of this License, 238 | in one of these ways: 239 | 240 | a) Convey the object code in, or embodied in, a physical product 241 | (including a physical distribution medium), accompanied by the 242 | Corresponding Source fixed on a durable physical medium 243 | customarily used for software interchange. 244 | 245 | b) Convey the object code in, or embodied in, a physical product 246 | (including a physical distribution medium), accompanied by a 247 | written offer, valid for at least three years and valid for as 248 | long as you offer spare parts or customer support for that product 249 | model, to give anyone who possesses the object code either (1) a 250 | copy of the Corresponding Source for all the software in the 251 | product that is covered by this License, on a durable physical 252 | medium customarily used for software interchange, for a price no 253 | more than your reasonable cost of physically performing this 254 | conveying of source, or (2) access to copy the 255 | Corresponding Source from a network server at no charge. 256 | 257 | c) Convey individual copies of the object code with a copy of the 258 | written offer to provide the Corresponding Source. This 259 | alternative is allowed only occasionally and noncommercially, and 260 | only if you received the object code with such an offer, in accord 261 | with subsection 6b. 262 | 263 | d) Convey the object code by offering access from a designated 264 | place (gratis or for a charge), and offer equivalent access to the 265 | Corresponding Source in the same way through the same place at no 266 | further charge. You need not require recipients to copy the 267 | Corresponding Source along with the object code. If the place to 268 | copy the object code is a network server, the Corresponding Source 269 | may be on a different server (operated by you or a third party) 270 | that supports equivalent copying facilities, provided you maintain 271 | clear directions next to the object code saying where to find the 272 | Corresponding Source. Regardless of what server hosts the 273 | Corresponding Source, you remain obligated to ensure that it is 274 | available for as long as needed to satisfy these requirements. 275 | 276 | e) Convey the object code using peer-to-peer transmission, provided 277 | you inform other peers where the object code and Corresponding 278 | Source of the work are being offered to the general public at no 279 | charge under subsection 6d. 280 | 281 | A separable portion of the object code, whose source code is excluded 282 | from the Corresponding Source as a System Library, need not be 283 | included in conveying the object code work. 284 | 285 | A "User Product" is either (1) a "consumer product", which means any 286 | tangible personal property which is normally used for personal, family, 287 | or household purposes, or (2) anything designed or sold for incorporation 288 | into a dwelling. In determining whether a product is a consumer product, 289 | doubtful cases shall be resolved in favor of coverage. For a particular 290 | product received by a particular user, "normally used" refers to a 291 | typical or common use of that class of product, regardless of the status 292 | of the particular user or of the way in which the particular user 293 | actually uses, or expects or is expected to use, the product. A product 294 | is a consumer product regardless of whether the product has substantial 295 | commercial, industrial or non-consumer uses, unless such uses represent 296 | the only significant mode of use of the product. 297 | 298 | "Installation Information" for a User Product means any methods, 299 | procedures, authorization keys, or other information required to install 300 | and execute modified versions of a covered work in that User Product from 301 | a modified version of its Corresponding Source. The information must 302 | suffice to ensure that the continued functioning of the modified object 303 | code is in no case prevented or interfered with solely because 304 | modification has been made. 305 | 306 | If you convey an object code work under this section in, or with, or 307 | specifically for use in, a User Product, and the conveying occurs as 308 | part of a transaction in which the right of possession and use of the 309 | User Product is transferred to the recipient in perpetuity or for a 310 | fixed term (regardless of how the transaction is characterized), the 311 | Corresponding Source conveyed under this section must be accompanied 312 | by the Installation Information. But this requirement does not apply 313 | if neither you nor any third party retains the ability to install 314 | modified object code on the User Product (for example, the work has 315 | been installed in ROM). 316 | 317 | The requirement to provide Installation Information does not include a 318 | requirement to continue to provide support service, warranty, or updates 319 | for a work that has been modified or installed by the recipient, or for 320 | the User Product in which it has been modified or installed. Access to a 321 | network may be denied when the modification itself materially and 322 | adversely affects the operation of the network or violates the rules and 323 | protocols for communication across the network. 324 | 325 | Corresponding Source conveyed, and Installation Information provided, 326 | in accord with this section must be in a format that is publicly 327 | documented (and with an implementation available to the public in 328 | source code form), and must require no special password or key for 329 | unpacking, reading or copying. 330 | 331 | 7. Additional Terms. 332 | 333 | "Additional permissions" are terms that supplement the terms of this 334 | License by making exceptions from one or more of its conditions. 335 | Additional permissions that are applicable to the entire Program shall 336 | be treated as though they were included in this License, to the extent 337 | that they are valid under applicable law. If additional permissions 338 | apply only to part of the Program, that part may be used separately 339 | under those permissions, but the entire Program remains governed by 340 | this License without regard to the additional permissions. 341 | 342 | When you convey a copy of a covered work, you may at your option 343 | remove any additional permissions from that copy, or from any part of 344 | it. (Additional permissions may be written to require their own 345 | removal in certain cases when you modify the work.) You may place 346 | additional permissions on material, added by you to a covered work, 347 | for which you have or can give appropriate copyright permission. 348 | 349 | Notwithstanding any other provision of this License, for material you 350 | add to a covered work, you may (if authorized by the copyright holders of 351 | that material) supplement the terms of this License with terms: 352 | 353 | a) Disclaiming warranty or limiting liability differently from the 354 | terms of sections 15 and 16 of this License; or 355 | 356 | b) Requiring preservation of specified reasonable legal notices or 357 | author attributions in that material or in the Appropriate Legal 358 | Notices displayed by works containing it; or 359 | 360 | c) Prohibiting misrepresentation of the origin of that material, or 361 | requiring that modified versions of such material be marked in 362 | reasonable ways as different from the original version; or 363 | 364 | d) Limiting the use for publicity purposes of names of licensors or 365 | authors of the material; or 366 | 367 | e) Declining to grant rights under trademark law for use of some 368 | trade names, trademarks, or service marks; or 369 | 370 | f) Requiring indemnification of licensors and authors of that 371 | material by anyone who conveys the material (or modified versions of 372 | it) with contractual assumptions of liability to the recipient, for 373 | any liability that these contractual assumptions directly impose on 374 | those licensors and authors. 375 | 376 | All other non-permissive additional terms are considered "further 377 | restrictions" within the meaning of section 10. If the Program as you 378 | received it, or any part of it, contains a notice stating that it is 379 | governed by this License along with a term that is a further 380 | restriction, you may remove that term. If a license document contains 381 | a further restriction but permits relicensing or conveying under this 382 | License, you may add to a covered work material governed by the terms 383 | of that license document, provided that the further restriction does 384 | not survive such relicensing or conveying. 385 | 386 | If you add terms to a covered work in accord with this section, you 387 | must place, in the relevant source files, a statement of the 388 | additional terms that apply to those files, or a notice indicating 389 | where to find the applicable terms. 390 | 391 | Additional terms, permissive or non-permissive, may be stated in the 392 | form of a separately written license, or stated as exceptions; 393 | the above requirements apply either way. 394 | 395 | 8. Termination. 396 | 397 | You may not propagate or modify a covered work except as expressly 398 | provided under this License. Any attempt otherwise to propagate or 399 | modify it is void, and will automatically terminate your rights under 400 | this License (including any patent licenses granted under the third 401 | paragraph of section 11). 402 | 403 | However, if you cease all violation of this License, then your 404 | license from a particular copyright holder is reinstated (a) 405 | provisionally, unless and until the copyright holder explicitly and 406 | finally terminates your license, and (b) permanently, if the copyright 407 | holder fails to notify you of the violation by some reasonable means 408 | prior to 60 days after the cessation. 409 | 410 | Moreover, your license from a particular copyright holder is 411 | reinstated permanently if the copyright holder notifies you of the 412 | violation by some reasonable means, this is the first time you have 413 | received notice of violation of this License (for any work) from that 414 | copyright holder, and you cure the violation prior to 30 days after 415 | your receipt of the notice. 416 | 417 | Termination of your rights under this section does not terminate the 418 | licenses of parties who have received copies or rights from you under 419 | this License. If your rights have been terminated and not permanently 420 | reinstated, you do not qualify to receive new licenses for the same 421 | material under section 10. 422 | 423 | 9. Acceptance Not Required for Having Copies. 424 | 425 | You are not required to accept this License in order to receive or 426 | run a copy of the Program. Ancillary propagation of a covered work 427 | occurring solely as a consequence of using peer-to-peer transmission 428 | to receive a copy likewise does not require acceptance. However, 429 | nothing other than this License grants you permission to propagate or 430 | modify any covered work. These actions infringe copyright if you do 431 | not accept this License. Therefore, by modifying or propagating a 432 | covered work, you indicate your acceptance of this License to do so. 433 | 434 | 10. Automatic Licensing of Downstream Recipients. 435 | 436 | Each time you convey a covered work, the recipient automatically 437 | receives a license from the original licensors, to run, modify and 438 | propagate that work, subject to this License. You are not responsible 439 | for enforcing compliance by third parties with this License. 440 | 441 | An "entity transaction" is a transaction transferring control of an 442 | organization, or substantially all assets of one, or subdividing an 443 | organization, or merging organizations. If propagation of a covered 444 | work results from an entity transaction, each party to that 445 | transaction who receives a copy of the work also receives whatever 446 | licenses to the work the party's predecessor in interest had or could 447 | give under the previous paragraph, plus a right to possession of the 448 | Corresponding Source of the work from the predecessor in interest, if 449 | the predecessor has it or can get it with reasonable efforts. 450 | 451 | You may not impose any further restrictions on the exercise of the 452 | rights granted or affirmed under this License. For example, you may 453 | not impose a license fee, royalty, or other charge for exercise of 454 | rights granted under this License, and you may not initiate litigation 455 | (including a cross-claim or counterclaim in a lawsuit) alleging that 456 | any patent claim is infringed by making, using, selling, offering for 457 | sale, or importing the Program or any portion of it. 458 | 459 | 11. Patents. 460 | 461 | A "contributor" is a copyright holder who authorizes use under this 462 | License of the Program or a work on which the Program is based. The 463 | work thus licensed is called the contributor's "contributor version". 464 | 465 | A contributor's "essential patent claims" are all patent claims 466 | owned or controlled by the contributor, whether already acquired or 467 | hereafter acquired, that would be infringed by some manner, permitted 468 | by this License, of making, using, or selling its contributor version, 469 | but do not include claims that would be infringed only as a 470 | consequence of further modification of the contributor version. For 471 | purposes of this definition, "control" includes the right to grant 472 | patent sublicenses in a manner consistent with the requirements of 473 | this License. 474 | 475 | Each contributor grants you a non-exclusive, worldwide, royalty-free 476 | patent license under the contributor's essential patent claims, to 477 | make, use, sell, offer for sale, import and otherwise run, modify and 478 | propagate the contents of its contributor version. 479 | 480 | In the following three paragraphs, a "patent license" is any express 481 | agreement or commitment, however denominated, not to enforce a patent 482 | (such as an express permission to practice a patent or covenant not to 483 | sue for patent infringement). To "grant" such a patent license to a 484 | party means to make such an agreement or commitment not to enforce a 485 | patent against the party. 486 | 487 | If you convey a covered work, knowingly relying on a patent license, 488 | and the Corresponding Source of the work is not available for anyone 489 | to copy, free of charge and under the terms of this License, through a 490 | publicly available network server or other readily accessible means, 491 | then you must either (1) cause the Corresponding Source to be so 492 | available, or (2) arrange to deprive yourself of the benefit of the 493 | patent license for this particular work, or (3) arrange, in a manner 494 | consistent with the requirements of this License, to extend the patent 495 | license to downstream recipients. "Knowingly relying" means you have 496 | actual knowledge that, but for the patent license, your conveying the 497 | covered work in a country, or your recipient's use of the covered work 498 | in a country, would infringe one or more identifiable patents in that 499 | country that you have reason to believe are valid. 500 | 501 | If, pursuant to or in connection with a single transaction or 502 | arrangement, you convey, or propagate by procuring conveyance of, a 503 | covered work, and grant a patent license to some of the parties 504 | receiving the covered work authorizing them to use, propagate, modify 505 | or convey a specific copy of the covered work, then the patent license 506 | you grant is automatically extended to all recipients of the covered 507 | work and works based on it. 508 | 509 | A patent license is "discriminatory" if it does not include within 510 | the scope of its coverage, prohibits the exercise of, or is 511 | conditioned on the non-exercise of one or more of the rights that are 512 | specifically granted under this License. You may not convey a covered 513 | work if you are a party to an arrangement with a third party that is 514 | in the business of distributing software, under which you make payment 515 | to the third party based on the extent of your activity of conveying 516 | the work, and under which the third party grants, to any of the 517 | parties who would receive the covered work from you, a discriminatory 518 | patent license (a) in connection with copies of the covered work 519 | conveyed by you (or copies made from those copies), or (b) primarily 520 | for and in connection with specific products or compilations that 521 | contain the covered work, unless you entered into that arrangement, 522 | or that patent license was granted, prior to 28 March 2007. 523 | 524 | Nothing in this License shall be construed as excluding or limiting 525 | any implied license or other defenses to infringement that may 526 | otherwise be available to you under applicable patent law. 527 | 528 | 12. No Surrender of Others' Freedom. 529 | 530 | If conditions are imposed on you (whether by court order, agreement or 531 | otherwise) that contradict the conditions of this License, they do not 532 | excuse you from the conditions of this License. If you cannot convey a 533 | covered work so as to satisfy simultaneously your obligations under this 534 | License and any other pertinent obligations, then as a consequence you may 535 | not convey it at all. For example, if you agree to terms that obligate you 536 | to collect a royalty for further conveying from those to whom you convey 537 | the Program, the only way you could satisfy both those terms and this 538 | License would be to refrain entirely from conveying the Program. 539 | 540 | 13. Remote Network Interaction; Use with the GNU General Public License. 541 | 542 | Notwithstanding any other provision of this License, if you modify the 543 | Program, your modified version must prominently offer all users 544 | interacting with it remotely through a computer network (if your version 545 | supports such interaction) an opportunity to receive the Corresponding 546 | Source of your version by providing access to the Corresponding Source 547 | from a network server at no charge, through some standard or customary 548 | means of facilitating copying of software. This Corresponding Source 549 | shall include the Corresponding Source for any work covered by version 3 550 | of the GNU General Public License that is incorporated pursuant to the 551 | following paragraph. 552 | 553 | Notwithstanding any other provision of this License, you have 554 | permission to link or combine any covered work with a work licensed 555 | under version 3 of the GNU General Public License into a single 556 | combined work, and to convey the resulting work. The terms of this 557 | License will continue to apply to the part which is the covered work, 558 | but the work with which it is combined will remain governed by version 559 | 3 of the GNU General Public License. 560 | 561 | 14. Revised Versions of this License. 562 | 563 | The Free Software Foundation may publish revised and/or new versions of 564 | the GNU Affero General Public License from time to time. Such new versions 565 | will be similar in spirit to the present version, but may differ in detail to 566 | address new problems or concerns. 567 | 568 | Each version is given a distinguishing version number. If the 569 | Program specifies that a certain numbered version of the GNU Affero General 570 | Public License "or any later version" applies to it, you have the 571 | option of following the terms and conditions either of that numbered 572 | version or of any later version published by the Free Software 573 | Foundation. If the Program does not specify a version number of the 574 | GNU Affero General Public License, you may choose any version ever published 575 | by the Free Software Foundation. 576 | 577 | If the Program specifies that a proxy can decide which future 578 | versions of the GNU Affero General Public License can be used, that proxy's 579 | public statement of acceptance of a version permanently authorizes you 580 | to choose that version for the Program. 581 | 582 | Later license versions may give you additional or different 583 | permissions. However, no additional obligations are imposed on any 584 | author or copyright holder as a result of your choosing to follow a 585 | later version. 586 | 587 | 15. Disclaimer of Warranty. 588 | 589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 597 | 598 | 16. Limitation of Liability. 599 | 600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 608 | SUCH DAMAGES. 609 | 610 | 17. Interpretation of Sections 15 and 16. 611 | 612 | If the disclaimer of warranty and limitation of liability provided 613 | above cannot be given local legal effect according to their terms, 614 | reviewing courts shall apply local law that most closely approximates 615 | an absolute waiver of all civil liability in connection with the 616 | Program, unless a warranty or assumption of liability accompanies a 617 | copy of the Program in return for a fee. 618 | 619 | END OF TERMS AND CONDITIONS 620 | 621 | How to Apply These Terms to Your New Programs 622 | 623 | If you develop a new program, and you want it to be of the greatest 624 | possible use to the public, the best way to achieve this is to make it 625 | free software which everyone can redistribute and change under these terms. 626 | 627 | To do so, attach the following notices to the program. It is safest 628 | to attach them to the start of each source file to most effectively 629 | state the exclusion of warranty; and each file should have at least 630 | the "copyright" line and a pointer to where the full notice is found. 631 | 632 | 633 | Copyright (C) 634 | 635 | This program is free software: you can redistribute it and/or modify 636 | it under the terms of the GNU Affero General Public License as published 637 | by the Free Software Foundation, either version 3 of the License, or 638 | (at your option) any later version. 639 | 640 | This program is distributed in the hope that it will be useful, 641 | but WITHOUT ANY WARRANTY; without even the implied warranty of 642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 643 | GNU Affero General Public License for more details. 644 | 645 | You should have received a copy of the GNU Affero General Public License 646 | along with this program. If not, see . 647 | 648 | Also add information on how to contact you by electronic and paper mail. 649 | 650 | If your software can interact with users remotely through a computer 651 | network, you should also make sure that it provides a way for users to 652 | get its source. For example, if your program is a web application, its 653 | interface could display a "Source" link that leads users to an archive 654 | of the code. There are many ways you could offer source, and different 655 | solutions will be better for different programs; see section 13 for the 656 | specific requirements. 657 | 658 | You should also get your employer (if you work as a programmer) or school, 659 | if any, to sign a "copyright disclaimer" for the program, if necessary. 660 | For more information on this, and how to apply and follow the GNU AGPL, see 661 | . 662 | -------------------------------------------------------------------------------- /buffMarketHelper.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name 网易BUFF价格比例(找挂刀)插件 3 | // @icon https://s1.ax1x.com/2022/03/25/qt3mcj.png 4 | // @description 找挂刀,看比例,挑玄学 5 | // @version 2.4.41 6 | // @note 更新于 2024-10-27 14:00:06.936 7 | // @author Pronax 8 | // @homepageURL https://greasyfork.org/zh-CN/users/412840-newell-gabe-l 9 | // @license AGPL-3.0 10 | // @copyright 2021, Pronax 11 | // @include /https:\/\/buff\.163\.com\/(market|goods)\/(csgo|dota2|rust|h1z1|tf2|pubg|pubg_recycle|\d+)/ 12 | // @run-at document-body 13 | // @grant GM_info 14 | // @grant GM_addStyle 15 | // @grant GM_setValue 16 | // @grant GM_getValue 17 | // @grant GM_xmlhttpRequest 18 | // @grant GM_registerMenuCommand 19 | // @require https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery-toast-plugin/1.3.2/jquery.toast.min.js 20 | // @connect steamcommunity.com 21 | // ==/UserScript== 22 | 23 | (function () { 24 | 25 | 'use strict'; 26 | 27 | // 防止重复安装冲突 28 | if ($(".logo").hasClass("buffHelperLoaded")) { return; } 29 | $(".logo").addClass("buffHelperLoaded"); 30 | 31 | // 全局(插件环境)异常捕获 32 | window.onerror = function (e) { 33 | try { 34 | // e.returnValue = false; 值为false时不会触发console.error事件 35 | if (!e.error) { return; } // 通常是浏览器内各种原因导致的报错 36 | let scriptName = undefined; 37 | // let errorType = undefined; 也许可以用来区分scriptManager,但是现在用不上 38 | let renderingEngine = window.navigator.userAgent.match(/(Chrome|Firefox)\/([^ ]*)/); 39 | let lineno = e.lineno; 40 | switch (renderingEngine && renderingEngine[1]) { 41 | case "Chrome": 42 | // chrome+TamperMonkey在这个脚本内报错的情况下会需要两次decode 43 | scriptName = decodeURIComponent(decodeURIComponent(e.filename.match(/([^\/=]*)\.user\.js/)[1])); 44 | lineno -= 534; 45 | // errorType = e.message.match(/^Uncaught ([a-zA-Z]*): /)[1]; 46 | break; 47 | case "Firefox": 48 | scriptName = decodeURIComponent(e.error.stack.match(/\/([^\/]*)\.user\.js/)[1]).trim(); 49 | lineno -= 1; 50 | // errorType = e.message.match(/^([a-zA-Z]*): /)[1]; 51 | break; 52 | default: 53 | return; 54 | } 55 | if (scriptName == "网易BUFF价格比例(找挂刀)插件") { 56 | let colno = e.colno; 57 | let errorMsg = e.error.message; 58 | let msgBody = `内核:${renderingEngine[0]}
版本:${GM_info.script.version}
区域:${helper_config.steamCurrency} ${steamConnection ? 200 : steamConnection == undefined ? "Unknow" : 404}
位置:${lineno}:${colno}
信息:${errorMsg}
路径:${location.pathname}
哈希:${location.hash}`; 59 | let msgHtml = `恭喜!你可能发现了一个bug
${msgBody}
点击下面的链接可以直接进行反馈
邮件反馈反馈贴反馈`; 60 | showMessage("出现了意料之外的错误", msgHtml, "error", false); 61 | } else { 62 | console.log(`插件名称:${scriptName}\n代码位置:${e.lineno}:${e.colno}\n错误信息:${e.message}`); 63 | } 64 | } catch { 65 | console.warn("unhandled 捕获了一个错误:", e); 66 | } 67 | } 68 | 69 | const STEAM_ORDER_SCALE_TEMPLATE = ""; 70 | const STEAM_SOLD_NUMBER_TEMPLATE = ""; 71 | const STEAM_ORDER_NUMBER_TEMPLATE = ""; 72 | const ERROR_TEMPLATE = ""; 73 | const WARNING_TEMPLATE = ""; 74 | const INFO_TEMPLATE = ""; 75 | const HIGHLIGHT_TEMPLATE = ""; 76 | const ENHANCEMENT_SUPPORT_LIST = Array("rifle", "knife", "pistol", "smg", "machinegun", "shotgun", "hands"); 77 | const DEFAULT_CONFIG = { 78 | maxRange: 1, 79 | minRange: 0.63, 80 | needSort: null, 81 | pageSize: 20, 82 | reverseSticker: false, 83 | orderFloatLeft: false, 84 | overrideSortRule: false, 85 | sortAfterAllDone: true, 86 | marketColorLow: "#ff1e1e", 87 | marketColorHigh: "#5027ff", 88 | steamCurrency: "CNY", 89 | currencyEffectCalculate: false, 90 | displaySoldNumber: false, 91 | buffSellThreshold: 0, 92 | }; 93 | 94 | const g_rgCurrencyData = { "AED": { "strCode": "AED", "eCurrencyCode": 32, "strSymbol": "AED", "bSymbolIsPrefix": false, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": " " }, "ARS": { "strCode": "ARS", "eCurrencyCode": 34, "strSymbol": "ARS$", "bSymbolIsPrefix": true, "bWholeUnitsOnly": false, "strDecimalSymbol": ",", "strThousandsSeparator": ".", "strSymbolAndNumberSeparator": " " }, "AUD": { "strCode": "AUD", "eCurrencyCode": 21, "strSymbol": "A$", "bSymbolIsPrefix": true, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": " " }, "BRL": { "strCode": "BRL", "eCurrencyCode": 7, "strSymbol": "R$", "bSymbolIsPrefix": true, "bWholeUnitsOnly": false, "strDecimalSymbol": ",", "strThousandsSeparator": ".", "strSymbolAndNumberSeparator": " " }, "CAD": { "strCode": "CAD", "eCurrencyCode": 20, "strSymbol": "CDN$", "bSymbolIsPrefix": true, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": " " }, "CHF": { "strCode": "CHF", "eCurrencyCode": 4, "strSymbol": "CHF", "bSymbolIsPrefix": true, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": " ", "strSymbolAndNumberSeparator": " " }, "CLP": { "strCode": "CLP", "eCurrencyCode": 25, "strSymbol": "CLP$", "bSymbolIsPrefix": true, "bWholeUnitsOnly": true, "strDecimalSymbol": ",", "strThousandsSeparator": ".", "strSymbolAndNumberSeparator": " " }, "CNY": { "strCode": "CNY", "eCurrencyCode": 23, "strSymbol": "¥", "bSymbolIsPrefix": true, "bWholeUnitsOnly": true, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": " " }, "COP": { "strCode": "COP", "eCurrencyCode": 27, "strSymbol": "COL$", "bSymbolIsPrefix": true, "bWholeUnitsOnly": true, "strDecimalSymbol": ",", "strThousandsSeparator": ".", "strSymbolAndNumberSeparator": " " }, "CRC": { "strCode": "CRC", "eCurrencyCode": 40, "strSymbol": "₡", "bSymbolIsPrefix": true, "bWholeUnitsOnly": true, "strDecimalSymbol": ",", "strThousandsSeparator": ".", "strSymbolAndNumberSeparator": "" }, "CZK": { "strCode": "CZK", "eCurrencyCode": 44, "strSymbol": "Kč", "bSymbolIsPrefix": false, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": " " }, "DKK": { "strCode": "DKK", "eCurrencyCode": 45, "strSymbol": "kr.", "bSymbolIsPrefix": false, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": " " }, "EUR": { "strCode": "EUR", "eCurrencyCode": 3, "strSymbol": "€", "bSymbolIsPrefix": false, "bWholeUnitsOnly": false, "strDecimalSymbol": ",", "strThousandsSeparator": " ", "strSymbolAndNumberSeparator": "" }, "GBP": { "strCode": "GBP", "eCurrencyCode": 2, "strSymbol": "£", "bSymbolIsPrefix": true, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": "" }, "HKD": { "strCode": "HKD", "eCurrencyCode": 29, "strSymbol": "HK$", "bSymbolIsPrefix": true, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": " " }, "HRK": { "strCode": "HRK", "eCurrencyCode": 43, "strSymbol": "kn", "bSymbolIsPrefix": false, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": " " }, "HUF": { "strCode": "HUF", "eCurrencyCode": 46, "strSymbol": "Ft", "bSymbolIsPrefix": false, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": " " }, "IDR": { "strCode": "IDR", "eCurrencyCode": 10, "strSymbol": "Rp", "bSymbolIsPrefix": true, "bWholeUnitsOnly": true, "strDecimalSymbol": ".", "strThousandsSeparator": " ", "strSymbolAndNumberSeparator": " " }, "ILS": { "strCode": "ILS", "eCurrencyCode": 35, "strSymbol": "₪", "bSymbolIsPrefix": true, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": "" }, "INR": { "strCode": "INR", "eCurrencyCode": 24, "strSymbol": "₹", "bSymbolIsPrefix": true, "bWholeUnitsOnly": true, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": " " }, "JPY": { "strCode": "JPY", "eCurrencyCode": 8, "strSymbol": "¥", "bSymbolIsPrefix": true, "bWholeUnitsOnly": true, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": " " }, "KRW": { "strCode": "KRW", "eCurrencyCode": 16, "strSymbol": "₩", "bSymbolIsPrefix": true, "bWholeUnitsOnly": true, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": " " }, "KWD": { "strCode": "KWD", "eCurrencyCode": 38, "strSymbol": "KD", "bSymbolIsPrefix": false, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": " " }, "KZT": { "strCode": "KZT", "eCurrencyCode": 37, "strSymbol": "₸", "bSymbolIsPrefix": false, "bWholeUnitsOnly": true, "strDecimalSymbol": ",", "strThousandsSeparator": " ", "strSymbolAndNumberSeparator": "" }, "MXN": { "strCode": "MXN", "eCurrencyCode": 19, "strSymbol": "Mex$", "bSymbolIsPrefix": true, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": " " }, "MYR": { "strCode": "MYR", "eCurrencyCode": 11, "strSymbol": "RM", "bSymbolIsPrefix": true, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": "" }, "NOK": { "strCode": "NOK", "eCurrencyCode": 9, "strSymbol": "kr", "bSymbolIsPrefix": false, "bWholeUnitsOnly": false, "strDecimalSymbol": ",", "strThousandsSeparator": ".", "strSymbolAndNumberSeparator": " " }, "NZD": { "strCode": "NZD", "eCurrencyCode": 22, "strSymbol": "NZ$", "bSymbolIsPrefix": true, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": " " }, "PEN": { "strCode": "PEN", "eCurrencyCode": 26, "strSymbol": "S/.", "bSymbolIsPrefix": true, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": "" }, "PHP": { "strCode": "PHP", "eCurrencyCode": 12, "strSymbol": "P", "bSymbolIsPrefix": true, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": "" }, "PLN": { "strCode": "PLN", "eCurrencyCode": 6, "strSymbol": "zł", "bSymbolIsPrefix": false, "bWholeUnitsOnly": false, "strDecimalSymbol": ",", "strThousandsSeparator": " ", "strSymbolAndNumberSeparator": "" }, "QAR": { "strCode": "QAR", "eCurrencyCode": 39, "strSymbol": "QR", "bSymbolIsPrefix": false, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": " " }, "RMB": { "strCode": "RMB", "eCurrencyCode": 23, "strSymbol": "¥", "bSymbolIsPrefix": true, "bWholeUnitsOnly": true, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": " " }, "RON": { "strCode": "RON", "eCurrencyCode": 47, "strSymbol": "lei", "bSymbolIsPrefix": false, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": " " }, "RUB": { "strCode": "RUB", "eCurrencyCode": 5, "strSymbol": "pуб.", "bSymbolIsPrefix": false, "bWholeUnitsOnly": true, "strDecimalSymbol": ",", "strThousandsSeparator": "", "strSymbolAndNumberSeparator": " " }, "SAR": { "strCode": "SAR", "eCurrencyCode": 31, "strSymbol": "SR", "bSymbolIsPrefix": false, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": " " }, "SEK": { "strCode": "SEK", "eCurrencyCode": 33, "strSymbol": "kr", "bSymbolIsPrefix": false, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": " " }, "SGD": { "strCode": "SGD", "eCurrencyCode": 13, "strSymbol": "S$", "bSymbolIsPrefix": true, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": "" }, "THB": { "strCode": "THB", "eCurrencyCode": 14, "strSymbol": "฿", "bSymbolIsPrefix": true, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": "" }, "TRY": { "strCode": "TRY", "eCurrencyCode": 17, "strSymbol": "TL", "bSymbolIsPrefix": false, "bWholeUnitsOnly": false, "strDecimalSymbol": ",", "strThousandsSeparator": ".", "strSymbolAndNumberSeparator": " " }, "TWD": { "strCode": "TWD", "eCurrencyCode": 30, "strSymbol": "NT$", "bSymbolIsPrefix": true, "bWholeUnitsOnly": true, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": " " }, "UAH": { "strCode": "UAH", "eCurrencyCode": 18, "strSymbol": "₴", "bSymbolIsPrefix": false, "bWholeUnitsOnly": true, "strDecimalSymbol": ",", "strThousandsSeparator": " ", "strSymbolAndNumberSeparator": "" }, "USD": { "strCode": "USD", "eCurrencyCode": 1, "strSymbol": "$", "bSymbolIsPrefix": true, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": ",", "strSymbolAndNumberSeparator": "" }, "UYU": { "strCode": "UYU", "eCurrencyCode": 41, "strSymbol": "$U", "bSymbolIsPrefix": true, "bWholeUnitsOnly": true, "strDecimalSymbol": ",", "strThousandsSeparator": ".", "strSymbolAndNumberSeparator": "" }, "VND": { "strCode": "VND", "eCurrencyCode": 15, "strSymbol": "₫", "bSymbolIsPrefix": false, "bWholeUnitsOnly": true, "strDecimalSymbol": ",", "strThousandsSeparator": ".", "strSymbolAndNumberSeparator": "" }, "ZAR": { "strCode": "ZAR", "eCurrencyCode": 28, "strSymbol": "R", "bSymbolIsPrefix": true, "bWholeUnitsOnly": false, "strDecimalSymbol": ".", "strThousandsSeparator": " ", "strSymbolAndNumberSeparator": " " } } 95 | const g_rgWalletInfo = { 96 | "wallet_currency": 23, 97 | "wallet_country": "CN", 98 | "wallet_state": "", 99 | "wallet_fee": "1", 100 | "wallet_fee_minimum": "1", 101 | "wallet_fee_percent": "0.05", 102 | "wallet_publisher_fee_percent_default": "0.10", 103 | "wallet_fee_base": "0", 104 | "wallet_balance": "20028", 105 | "wallet_delayed_balance": "0", 106 | "wallet_max_balance": "1300000", 107 | "wallet_trade_max_balance": "1170000" 108 | } 109 | 110 | var helper_config = loadConfig(); 111 | var steamCurrency; 112 | var exchangeRate = GM_getValue("exchangeRate") || { 113 | FtoC: 1, 114 | CtoF: 1, 115 | time_next_update_unix: 0, 116 | time_update_unix: 0 117 | }; 118 | var ajaxTimeout = 20000; 119 | var steamConnection = undefined; 120 | var steamFailedTimes = 0; 121 | var market_color_high = []; 122 | var market_color_low = []; 123 | var itemCount = 0; 124 | var itemNum = 0; 125 | var needSort; 126 | 127 | // 翻页类的操作没有重新加载的必要,用var可以直接当缓存用,不过只适用某个具体商品详情页 128 | var steam_lowest_sell_order = 0; // steam最低出售价 129 | var steam_highest_buy_order = 0; // steam最高求购价 130 | 131 | // toast CSS 132 | GM_addStyle(".jq-toast-wrap{display:block;position:fixed;width:250px;pointer-events:none!important;margin:0;padding:0;letter-spacing:normal;z-index:9000!important}.jq-toast-wrap *{margin:0;padding:0}.jq-toast-wrap.bottom-left{bottom:20px;left:20px}.jq-toast-wrap.bottom-right{bottom:20px;right:40px}.jq-toast-wrap.top-left{top:20px;left:20px}.jq-toast-wrap.top-right{top:20px;right:74px}.jq-toast-single{display:block;width:100%;padding:10px;margin:0 0 5px;border-radius:4px;font-size:15px;font-family:arial,sans-serif;line-height:18px;position:relative;pointer-events:all!important;background-color:#444;color:white;white-space:normal;word-break:break-all;overflow:hidden}.jq-toast-single hr{border:1px solid #fff;margin:4px 0}.jq-toast-single h2{font-family:arial,sans-serif;font-size:18px;font-weight:bold;margin:0 0 7px;background:0;color:inherit;line-height:inherit;letter-spacing:normal}.jq-toast-single a{color:#eee;text-decoration:none;font-weight:bold;border-bottom:1px solid white;margin-right:8px}.jq-toast-single ul{margin:0 0 0 15px;background:0;padding:0}.jq-toast-single ul li{list-style-type:disc!important;line-height:17px;background:0;margin:0;padding:0;letter-spacing:normal}.close-jq-toast-single{position:absolute;top:2px;right:5px;font-size:22px;cursor:pointer}.jq-toast-loader{display:block;position:absolute;bottom:0;height:4px;width:0;left:0;background:#000!important;opacity:.4}.jq-toast-loaded{width:100%}.jq-has-icon{padding:10px 10px 10px 43px;background-repeat:no-repeat;background-position:10px}.jq-icon-info{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=');background-color:#2878c1e6;color:#d9edf7;border-color:#bce8f1}.jq-icon-warning{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=');background-color:#F89406cc;color:#fcf8e3;border-color:#faebcc}.jq-icon-error{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=');background-color:#d4372fcc;color:#f2dede;border-color:#ebccd1}.jq-icon-success{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==');color:#dff0d8;background-color:#059850e6;border-color:#d6e9c6}.jq-icon-info:hover{background-color:#2878c1}.jq-icon-warning:hover{background-color:#e48b06}.jq-icon-error:hover{background-color:#c53d36}.jq-icon-success:hover{background-color:#059850}"); 133 | // 设置界面 134 | GM_addStyle(".helper_importantA{font-size:22px;font-weight:bold;color:#ffa914 !important}.helper_importantA:hover{color:#ff2c2c !important}.helper-setting input[type=number]{max-width:70px}input[type=\"number\"]{-moz-appearance:textfield}.helper-setting-shadow{position:fixed;justify-content:center;align-items:center;display:none;z-index:100;top:0;right:0;bottom:0;left:0;margin:0;background:#00000066}.helper-setting{background:#fff;border-radius:5px;padding:30px 40px 10px;top:25%;opacity:0.95;}.w-Checkbox.helper-setting-option>span:first-child{margin:0!important;font-size:14px}.helper-setting-steamConnection i.icon{margin-left:0!important}.helper-setting .list_tb span,.helper-setting .list_tb i.icon{margin-left:12px}.helper-setting .icon_status_progressing{animation:rotate-L 1.5s linear infinite;-webkit-animation:rotate-L 1.5s linear infinite}.helper-setting>.list_tb tr:last-child>td{border-bottom:0}.helper-setting td.setting-title{height:0;border:0;padding:5px 0 0 0}"); 135 | $("body").append('
基础设定插件版本:
STEAM连接性:未知检测
Steam参考货币

默认

    无视汇率
    市场页设定
    在售数量门槛
    覆盖排序规则
    启用
    完成后排序
    启用
    默认排序规则

    不排序

    • 不排序
    • 按buff比例从低到高
    • 按buff比例从高到低
    • 按求购比例从低到高
    • 按求购比例从高到低
    每页显示数量
    渐变色最小 最大
    比例极值最小 最大
    商品页设定
    求购列表靠左显示
    启用
    反向贴纸顺序
    启用
    插件免费 请勿上当 官网安装 防止盗号
    插件官网常见问题恢复默认设置使用教程问题反馈
    '); 136 | // 初始化货币 137 | initCurrency(); 138 | // 添加翻页和设置按钮,初始化部分数据 139 | initHelper(); 140 | 141 | if (location.pathname.startsWith("/goods/")) { 142 | // 自带css 143 | GM_addStyle(".market_commodity_orders_header_promote {color: whitesmoke;}#steam_sold{margin-top:5px}#steam_order{margin-top:5px}#steam_order_error{margin-top:5px;font-size: medium;font-weight: bold;color: #ff1e3e;}.market_listing_price_with_fee{color: #ffae3a;font-size: 12px;margin-left: 6px;}"); 144 | GM_addStyle(".steam-link{float:right;margin-top:3px}.detail-cont>.blank20{height:10px}"); 145 | // 组件css 146 | GM_addStyle(".paymentIcon{padding:1px 17px 0 !important;position:absolute}a.j_shoptip_handler{margin-right:10px}.user-thum{margin: 0;}.list_tb_csgo>tr>th:first-child{width:5px}.list_tb_csgo>tr>th:nth-child(2){padding-right:9px}.list_tb_csgo>tr>th:nth-child(4){min-width:185px !important}.list_tb_csgo .pic-cont{width:112px;height:84px}.list_tb_csgo .pic-cont img{height:100%;}.csgo_sticker.has_wear{position:absolute;display: inline-block;margin:10px 0 0 270px}.csgo_sticker.has_wear .stickers{width:62px;height:48px;margin:0;background: 0;}.stag{margin:0 0 0 2px !important;padding: 4px 6px;float:none !important}.float_rank{color: green;}.stickers:hover{opacity:1!important}"); 147 | GM_addStyle(".tooltip .tooltiptext{visibility:hidden;border: 1px solid #d0d0d0;width:128px;height:96px;background-color:#fbfbfbc7;position:absolute;z-index:60;bottom:100%;margin-left:-62px;border-radius:10px}.tooltip:hover .tooltiptext{visibility:visible}"); 148 | // 求购列表css 149 | GM_addStyle(".market_commodity_orders_table.order_float_left{margin: 0 10px 0 0;float: left;}.market_commodity_orders_table{margin: 0 0 0 10px;height:100%;float:right;border-collapse:separate;background-color:rgba(0,0,0,0.3);}.market_commodity_orders_table tr:nth-child(even){background-color:#242b33}.market_commodity_orders_table td{text-align:center;padding:4px}.market_commodity_orders_table th{padding:4px;margin:0;text-align:center;font-size:16px;font-weight:normal}"); 150 | // 求购警告css 151 | GM_addStyle('#steam_order .warning{ position: relative; margin: 0 0 0 4px; display: inline-flex; vertical-align: text-bottom; } #steam_order .warning .tips { visibility: hidden; position: absolute; width: 200px; top: 100%; left: 0; background: #111111; padding: 4px;} #steam_order:hover .warning .tips { visibility: visible; }'); 152 | 153 | (function initSteamLink() { 154 | if (!document.querySelector(".detail-cont")) { 155 | requestIdleCallback(initSteamLink, { timeout: 300 }); 156 | return; 157 | } 158 | $(".detail-pic").css("background-repeat", "round").children().width(250); 159 | if ($("#j_game-switcher").data("current") == "dota2") { 160 | $(".detail-cont>p").append($(".detail-summ>a").clone().addClass("steam-link")); 161 | } else { 162 | $(".detail-cont>div:first").append($(".detail-summ>a").clone().addClass("steam-link")); 163 | } 164 | 165 | // 适配 ”饰品比例计算脚本“ greasyfork.org/scripts/35597 166 | // 防止排版冲突混乱 167 | $(".detail-summ>a").hide(); 168 | $(".detail-cont").css("margin-left", 0); 169 | })(); 170 | 171 | $(document).ajaxSuccess(function (event, status, header, result) { 172 | if (/^\/api\/market\/goods\/sell_order/.exec(header.url) && result.data && result.data.goods_infos[getGoodsId()] && result.data.total_count) { 173 | steamFailedTimes = 0; 174 | buffHelperModule_inspestEnhancementCsgo(result.data); 175 | buffHelperGoodsDetailScale(result.data); 176 | } 177 | }); 178 | } else if (location.pathname.startsWith("/market/")) { 179 | // 主要样式 180 | GM_addStyle(".steam_temp{margin-top: inherit;}#sort_scale{display:inline-block;padding:0 6px 0 16px;cursor:pointer;height:32px;margin-left:5px;line-height:32px;text-align:center;border-radius:4px;min-width:60px;border:1px solid #45536c;color:#63779b;vertical-align:middle}#sort_scale.enabled{background:#45536c;color:#fff}.list_card li{padding-bottom:0}.list_card li h3{margin: 4px 8px;}.list_card li p{margin: 6px 8px;}.list_card li>p>span.l_Left{margin-top:inherit}.list_card li>p>strong.f_Strong{display:block;font-size:20px;min-height:20px;}.price_scale{padding-top:2px}"); 181 | // 进度条样式 182 | GM_addStyle(".helper-loading{position:absolute;margin:11px}.helper-progress-bar{height:20px;background:linear-gradient(130deg, rgb(33 86 183 / 61%) 20%, rgb(15 116 187 / 35%) 85%, transparent);width:0;z-index:1000}"); 183 | 184 | $(document).ajaxSend(function (event, xhr, header, result) { 185 | if (/^\/api\/market\/goods/.exec(header.url)) { 186 | header.url += "&page_size=" + helper_config.pageSize; 187 | $(".helper-progress-bar").remove(); 188 | $(".helper-loading").remove(); 189 | steamFailedTimes = 0; 190 | } 191 | }); 192 | $(document).ajaxSuccess(function (event, xhr, header, result) { 193 | if (/^\/api\/market\/goods/.exec(header.url) && result.data && result.data.total_count) { 194 | buffHelperMarkerListScale(result.data.items); 195 | } else if (/\/api\/market\/sell_order\/top_bookmarked/.exec(header.url)) { 196 | let warningTimes = GM_getValue("top_bookmarked-warning") || 0; 197 | if (warningTimes < 3) { 198 | GM_setValue("top_bookmarked-warning", ++warningTimes); 199 | showMessage("插件不会在热门关注运行", "出售、求购板块都可以使用
    哪有人会关注溢价商品的比例呢?", "warning", 16000 - 4000 * warningTimes); 200 | } 201 | } 202 | }); 203 | if ($(".block-header>.l_Right").length == 0) { 204 | setTimeout(initSortBtn, 100); 205 | } else { 206 | initSortBtn(); 207 | } 208 | } 209 | 210 | // 商品详情 211 | window.buffHelperGoodsDetailScale = function (data) { 212 | // 检测商品是否加载完成 213 | if ($("#market-selling-list").length == 0) { 214 | setTimeout(buffHelperGoodsDetailScale, 100); 215 | return; 216 | } 217 | $(".detail-cont").append(""); 218 | goodsDetailLoadData(data); 219 | 220 | async function goodsDetailLoadData(data, secendTry) { 221 | let price_list = $(".f_Strong"); 222 | let isLogined = $("#navbar-cash-amount").length == 1; 223 | let isFirstTime = $(".good_scale").length == 0; 224 | let buff_item_id = getGoodsId(); 225 | let app_id = data.goods_infos[buff_item_id].appid; 226 | let hash_name = escape(data.goods_infos[buff_item_id].market_hash_name); 227 | let steamLink = $(".detail-summ>a").attr("href") || `https://steamcommunity.com/market/listings/${app_id}/${hash_name}`; 228 | let items = data.items; 229 | let steam_price_cny = data.goods_infos[buff_item_id].steam_price_cny * 100; 230 | if (isFirstTime) { 231 | getSteamSoldNumber(app_id, hash_name).then((soldNumber) => { 232 | if (soldNumber.success) { 233 | $(".detail-cont").append(`
    ${soldNumber.volume || 0} 份在 24 小时内售出
    `); 234 | } else { 235 | $(".detail-cont").append(`
    获取steam销量失败,原因:${soldNumber.statusText.split(",")[0]}
    `); 236 | } 237 | }); 238 | let orderList = await getSteamOrderList(buff_item_id, steamLink); 239 | if (orderList.success) { 240 | steam_highest_buy_order = orderList.highest_buy_order && { 241 | origin: orderList.highest_buy_order, 242 | cny: FtoC(orderList.highest_buy_order) 243 | }; 244 | steam_lowest_sell_order = orderList.lowest_sell_order && { 245 | origin: orderList.lowest_sell_order, 246 | cny: FtoC(orderList.lowest_sell_order) 247 | }; 248 | if (orderList.buy_order_table != "") { 249 | $(".detail-cont").append(`
    ${orderList.buy_order_summary}
    `); 250 | $(".detail-pic").after(orderList.buy_order_table); 251 | let buff_sell_price = data.items[0].price; 252 | $(".market_commodity_orders_header_promote:last").after(`${getScale(buff_sell_price, steam_highest_buy_order.cny)}`); 253 | // 求购表格 254 | $(".market_commodity_orders_table th:first").after("比例"); 255 | let orderTableList = $(".market_commodity_orders_table tr"); 256 | let viableScale = 0 // steam订购单比例低于1的数量 257 | for (let i = 1; i < orderTableList.length; i++) { 258 | let td = $(orderTableList[i]).find("td:first"); 259 | let td_count = $(orderTableList[i]).find("td:last"); 260 | let priceGroup = convertPrice(td.text()); 261 | let scale = getScale(buff_sell_price, FtoC(priceGroup[1] + (priceGroup[3] || "00"))) 262 | td.after(`${scale}`); 263 | 264 | // 检查steam订购单异常情况,若只有个别比例低于1,提醒用户,排除用于尾部统计的最后一行 265 | if (scale < 1 && i < orderTableList.length - 1) { 266 | viableScale += parseInt(td_count.text()) 267 | } 268 | } 269 | // 当只有个别比例低于1时,添加提醒 270 | switch (true) { 271 | case viableScale == 0: break; 272 | case viableScale < 3: 273 | $('#steam_order').append(`
    仅有个别Steam订购单比例低于1,小心卖家自设虚假订购单
    `) 274 | break; 275 | case viableScale < 5: 276 | $('#steam_order').append(`
    比例低于1的Steam订购单过少,请小心购买
    `) 277 | break; 278 | } 279 | 280 | if (helper_config.orderFloatLeft) { 281 | $(".market_commodity_orders_table").addClass("order_float_left"); 282 | } 283 | } 284 | } else { 285 | if ((!secendTry) && orderList.status == "500") { 286 | setTimeout(() => { 287 | goodsDetailLoadData(data, true); 288 | }, 100); 289 | return; 290 | } 291 | $(".detail-cont").append(`
    ${orderList.statusText}
    `); 292 | } 293 | } 294 | $(".helper-loading").remove(); 295 | $(".detail-tab-cont th:last").before('比例'); 296 | if (steam_lowest_sell_order) { 297 | $(".f_Strong .hide-usd")[0].innerText = getWithoutFeePrice(steam_lowest_sell_order.origin, 1); 298 | } else { 299 | $(".f_Strong .hide-usd")[0].innerText = getWithoutFeePrice(steam_price_cny, 1, "CNY"); 300 | } 301 | for (let i = 0; i < items.length; i++) { 302 | let buff_sell_price = items[i].price; 303 | let scale = getScale(buff_sell_price, steam_lowest_sell_order ? steam_lowest_sell_order.cny : steam_price_cny); 304 | if (scale === Infinity) { 305 | scale = "∞"; 306 | } 307 | if (!i) { 308 | let color; 309 | switch (true) { 310 | case scale > 0.9: color = "#a0ffc5"; break; 311 | case scale > 0.8: color = "#b8ff8a"; break; 312 | case scale > 0.74: color = "#fff054"; break; 313 | case scale > 0.67: color = "#ff7e15"; break; 314 | default: color = "#ff0049"; break; 315 | } 316 | if (isFirstTime) { 317 | $(".steam-link").prop("href", $(".steam-link").prop("href") + "?buffPrice=" + buff_sell_price); 318 | $(price_list[isLogined ? 1 : 0]).append($(`${scale}`)); 319 | } else { 320 | $(".steam-link").prop("href", $(".steam-link").prop("href").replace(/\d{0,6}[.]?\d{0,2}$/, buff_sell_price)); 321 | $(".good_scale").text(scale).css("color", color); 322 | } 323 | } 324 | $(price_list[i + (isLogined ? 2 : 1)]).parents("td").after(`
    ${scale}

    ${steam_highest_buy_order ? getScale(buff_sell_price, steam_highest_buy_order.cny) : ''}

    `); 325 | } 326 | daemonThread(); 327 | } 328 | } 329 | 330 | // 市场目录 331 | window.buffHelperMarkerListScale = async function (items) { 332 | // 检测商品是否加载完成 333 | if ($("#j_list_card>ul>li").length == 0) { 334 | setTimeout(buffHelperMarkerListScale, 100); 335 | return; 336 | } 337 | $(".list_card li>p>span.l_Right").removeClass("l_Right").addClass("l_Left"); 338 | let randomID = Math.round(Math.random() * 1000); 339 | let goods = $("#j_list_card>ul>li"); 340 | itemNum = items.length; 341 | // 添加进度条 342 | $(".tab>li.on").append(""); 343 | $(".market-list .blank20:last").prepend('
    '); 344 | for (let i = 0; i < goods.length; i++) { 345 | $(goods[i]).attr("data-default-sort", i); 346 | if (items[i].sell_num == 0) { 347 | updateProgressBar(randomID); 348 | continue; 349 | } 350 | await marketListLoadData(items[i], goods[i], randomID); 351 | } 352 | 353 | async function marketListLoadData(item, good, randomID, secendTry) { 354 | let target = $(good).find("p>strong.f_Strong")[0]; 355 | let buff_item_id = item.id; // buff商品ID 356 | let buff_buy_num = item.buy_num; // buff求购数量 357 | let buff_buy_max_price = item.buy_max_price; // buff求购最高价 358 | let buff_sell_num = item.sell_num; // buff在售数量 359 | let buff_sell_min_price = item.sell_min_price; // buff出售最低价 360 | let steam_price_cny = item.goods_info.steam_price_cny * 100; // buff提供的steam国区售价 361 | let steam_market_url = item.steam_market_url; // steam市场链接 362 | let buff_sell_reference_price = item.sell_reference_price; // buff出售参考价(没卵用) 363 | let steam_highest_buy_order = undefined; // 不能使用全局变量,不然未成功加载的数据比例会错误 364 | let steam_lowest_sell_order = undefined; // 不能使用全局变量,不然未成功加载的数据比例会错误 365 | $(good).attr("data-order-sort", Infinity); 366 | $(good).attr("data-sold_number-sort", Infinity); 367 | if (helper_config.buffSellThreshold >= buff_sell_num) { 368 | $(good).attr("data-buff-sort", Infinity); 369 | $(target).after($(HIGHLIGHT_TEMPLATE).text("已忽略")); 370 | } else { 371 | let orderList = await getSteamOrderList(buff_item_id, steam_market_url); 372 | if (orderList.success) { 373 | steam_highest_buy_order = orderList.highest_buy_order && { 374 | origin: orderList.highest_buy_order, 375 | cny: FtoC(orderList.highest_buy_order) 376 | }; 377 | steam_lowest_sell_order = orderList.lowest_sell_order && { 378 | origin: orderList.lowest_sell_order, 379 | cny: FtoC(orderList.lowest_sell_order) 380 | }; 381 | // 没有有效的订购单 382 | if (orderList.buy_order_table == "") { 383 | $(target).after($(INFO_TEMPLATE).text("没有有效订购单")); 384 | } else { 385 | let steamOrderScale = getScale(buff_sell_min_price, steam_highest_buy_order.cny); 386 | if (helper_config.displaySoldNumber) { 387 | let soldNumber = await getSteamSoldNumber(item.appid, item.market_hash_name); 388 | if (soldNumber.success) { 389 | soldNumber.volume = soldNumber.volume.replace(",", ""); 390 | $(good).attr("data-sold_number-sort", soldNumber.volume || 0); 391 | $(target).after($(STEAM_SOLD_NUMBER_TEMPLATE).text((soldNumber.volume || 0) + "┊")); 392 | } else { 393 | let text = soldNumber.statusTextShort; 394 | $(target).after($(STEAM_SOLD_NUMBER_TEMPLATE).text((text ? text : "错误") + "┊")); 395 | } 396 | } else { 397 | let orderNumber = $(orderList.buy_order_summary)[0].innerText; 398 | $(good).attr("data-order-sort", steamOrderScale); 399 | $(target).after($(STEAM_ORDER_NUMBER_TEMPLATE).text(orderNumber + "┊")); 400 | } 401 | paintingGradient(steamOrderScale, target, 4, STEAM_ORDER_SCALE_TEMPLATE); 402 | } 403 | } else { 404 | if ((!secendTry) && orderList.status == 500) { 405 | setTimeout(() => { 406 | marketListLoadData(item, good, randomID, true); 407 | }, 100); 408 | return; 409 | } 410 | $(target).after($(ERROR_TEMPLATE).text(orderList.statusText.split(",")[0])); 411 | } 412 | let withoutFeePrice = getWithoutFeePrice(steam_lowest_sell_order ? steam_lowest_sell_order.origin : steam_price_cny); 413 | let scale = getScale(buff_sell_min_price, steam_lowest_sell_order ? steam_lowest_sell_order.cny : steam_price_cny); 414 | $(good).attr("data-buff-sort", scale); 415 | $(target).prepend(`${target.childNodes[0].textContent}`); 416 | target.childNodes[1].remove(); 417 | $(target).append($("").css("margin-left", "5px").text(withoutFeePrice)); 418 | paintingGradient(scale, target, 3); 419 | withoutFeePrice = target.children[target.children.length - 2]; 420 | scale = target.children[target.children.length - 1]; 421 | let strWidth = 5; 422 | for (let i = 0; i < target.children.length; i++) { 423 | strWidth += target.children[i].offsetWidth; 424 | } 425 | let displayPrice = $(target).text().match(/([€₽\$¥]\s)((\d+)(\.\d{1,2})?)/) || [""]; 426 | let tryMe = 0; 427 | while (strWidth >= 192) { 428 | switch (tryMe++) { 429 | // 超长以后显示的越少越好,所以不用toFixed以免出现小数是0的情况 430 | case 0: // 0/1 431 | withoutFeePrice.innerText = Math.round(withoutFeePrice.innerText * 10) / 10; 432 | break; 433 | case 1: // 0/2 434 | withoutFeePrice.innerText = Math.round(withoutFeePrice.innerText); 435 | break; 436 | case 2: // 0/1 437 | scale.innerText = Math.round(scale.innerText * 10) / 10; 438 | break; 439 | case 3: // 0/3 440 | let text = displayPrice[1] + Math.ceil(displayPrice[2]); // 价格抹零 441 | $(target).text(text); 442 | displayPrice = text.match(/([€₽\$¥]\s)((\d+)(\.\d{1,2})?)/); 443 | break; 444 | case 4: // 0/2 445 | scale.innerText = Math.ceil(scale.innerText); 446 | break; 447 | case 5: // no one's gonna know 448 | // $(target).text((+displayPrice[3]).toString(16)); 449 | // withoutFeePrice.innerText = withoutFeePrice.innerText.toString(16); 450 | withoutFeePrice.innerText = ""; 451 | strWidth = 0; 452 | continue; 453 | } 454 | strWidth = 5; 455 | for (let i = 0; i < target.children.length; i++) { 456 | strWidth += target.children[i].offsetWidth; 457 | } 458 | } 459 | } 460 | if (needSort && (helper_config.sortAfterAllDone ? itemCount == itemNum - 1 : true)) { 461 | let arr = needSort.split("_"); 462 | sortGoods("data-" + arr[0], arr[1] == "asc"); 463 | } 464 | updateProgressBar(randomID); 465 | } 466 | } 467 | 468 | // 检视增强模组 469 | window.buffHelperModule_inspestEnhancementCsgo = function (data) { 470 | // 检测商品是否加载完成 471 | if ($("#market-selling-list").length == 0) { 472 | setTimeout(buffHelperModule_inspestEnhancementCsgo, 100); 473 | return; 474 | } 475 | if ($("#market-selling-list").hasClass("buffed")) { return; } 476 | $("#market-selling-list").addClass("buffed"); 477 | // 不支持微信时给个占位图标 478 | let alipayIcon = $(".icon_payment_alipay"); 479 | for (let i = 0; i < alipayIcon.length; i++) { 480 | let element = alipayIcon[i]; 481 | if (!element.nextElementSibling) { 482 | $(element).after(''); 483 | } 484 | } 485 | // 支付图标移动到购买按钮下 486 | let paymentIcon = $(".icon_payment_alipay,.icon_payment_others").parent(); 487 | paymentIcon.addClass("paymentIcon on"); 488 | $(".paymentIcon .icon_payment_alipay").addClass("icon_select_alipay_small").removeClass("icon_payment_alipay"); 489 | $(".paymentIcon .icon_payment_others").addClass("icon_select_wx_small").removeClass("icon_payment_others"); 490 | for (let i = 0; i < paymentIcon.length; i++) { 491 | const element = paymentIcon[i]; 492 | $(element).parent().next().append(element); 493 | } 494 | // 检测是否支持这个类型/游戏的饰品 495 | let goods_id = getGoodsId(); 496 | if (data.goods_infos[goods_id].appid != 730 || ENHANCEMENT_SUPPORT_LIST.indexOf(data.goods_infos[goods_id].tags.category_group.internal_name) < 0) { return; } 497 | // 英文页面标志 498 | let isEn = $("#j_lang-switcher").data("current") === "en"; 499 | // 整体CSS 500 | $(".list_tb_csgo>tr>th.t_Left")[0].style.width = "550px"; 501 | // 给检视按钮去掉点击属性,防止产生图片无法关闭的bug 502 | $(".csgo_inspect_img_btn").attr("disabled", true).css({ 503 | "pointer-events": "none" 504 | }); 505 | // 给饰品图片加入点击属性用于检视 506 | $(".pic-cont.item-detail-img").click(function () { 507 | this.children[1].click(); 508 | }).mouseenter(function () { 509 | $(this).css("background", $(this.children[1]).css("background")); 510 | }).mouseleave(function () { 511 | $(this).css("background", ""); 512 | }).css({ 513 | "cursor": "pointer" 514 | }); 515 | // 拿到每个饰品对应的dom 516 | let skin_list = $(".list_tb_csgo").find("[id^='sell_order_']"); 517 | for (let i = 0; i < skin_list.length; i++) { 518 | let mom = skin_list[i]; 519 | // 贴纸移动到图片dom中(保证垂直居中) 520 | let sticker = $(mom).find(".csgo_sticker"); 521 | $(sticker).addClass("sticker_parent_div"); 522 | $(mom).find("td:nth-child(2)").prepend(sticker); 523 | getItemDetail(mom); 524 | } 525 | // 渐变/淬火等特殊皮肤的tag 526 | let stags = $(".stag"); 527 | for (let i = 0; i < stags.length; i++) { 528 | let stag = $(stags[i]); 529 | stag.prev().append(stag); 530 | } 531 | // 贴纸大图 532 | let stickers = $(".stickers"); 533 | for (let i = 0; i < stickers.length; i++) { 534 | let element = stickers[i]; 535 | element.innerHTML += "" + element.innerHTML + ""; 536 | } 537 | $("span.f_12px.c_Gray:contains('%')").css("margin-left", "6px"); 538 | stickers.addClass("tooltip"); 539 | // 贴纸遮盖 540 | stickers = $(".stickers.masked"); 541 | let min = 0.3; 542 | for (let i = 0; i < stickers.length; i++) { 543 | let float = parseInt(stickers[i].nextElementSibling.innerText); 544 | $(stickers[i]).css("opacity", float * (1 - min) / 100 + min); 545 | } 546 | $(".stickers.masked").removeClass("masked"); 547 | // 贴纸顺序 548 | if (helper_config.reverseSticker) { 549 | $(".sticker-cont").css("float", "right"); 550 | } 551 | // 英文页面3D检视 552 | if (isEn) { 553 | $(".ctag.btn_3d").html($(".ctag.btn_3d").html().substr(0, 37)); 554 | } 555 | 556 | function getItemDetail(parent, secondTime) { 557 | if ($(parent).find(".textOne")[0]) { return; } 558 | // 拿到每个饰品的图片对象 559 | let skin = $(parent).find(".item-detail-img")[0]; 560 | // 获取饰品对应的信息并加载进data 561 | let classid = $(skin).data("classid"); 562 | let instanceid = $(skin).data("instanceid"); 563 | let sell_order_id = $(skin).data("orderid"); 564 | let origin = $(skin).data("origin"); 565 | let assetid = $(skin).data("assetid"); 566 | let data = { 567 | appid: 730, 568 | game: "csgo", 569 | classid: classid, 570 | instanceid: instanceid, 571 | sell_order_id: sell_order_id, 572 | origin: origin, 573 | assetid: assetid 574 | }; 575 | // 发送异步请求获取饰品详情 576 | $.ajax({ 577 | url: "/market/item_detail", 578 | method: "get", 579 | timeout: ajaxTimeout, 580 | data: data, 581 | success: function (data) { 582 | let result = $(data)[0]; 583 | // 获取待添加种子的dom对象 584 | let origin_float = $(parent).find(".wear-value")[0]; 585 | try { 586 | let seed = "
    图案模板(seed): " + $(result).find(".skin-info>p:first").text().match(/\d{1,}/)[0] + "
    "; 587 | $(origin_float).before(seed); 588 | } catch (error) { 589 | if (secondTime) { 590 | $(origin_float).before("
    获取失败,请稍后再试
    "); 591 | return; 592 | } else { 593 | setTimeout(getItemDetail(parent, true), 500); 594 | } 595 | } 596 | // 获取名称标签对象 597 | let name = $(result).find("p.name_tag")[0]; 598 | if (name) { 599 | // 设定名称标签的样式 600 | $(name).css({ 601 | "background": "transparent", 602 | "padding": "0" 603 | }); 604 | // 获取待添加名称标签的对象并添加名称标签 605 | let targ_name = $(parent).find(".csgo_value")[0]; 606 | $(targ_name).before(name); 607 | } 608 | // 截取皮肤磨损并加粗 609 | origin_float.innerHTML = "磨损: " + origin_float.innerText.match(/0[.]\d*/)[0] + ""; 610 | // 获取排名对象 611 | let rank = $(result).find(".skin-info>.des")[0]; 612 | if (rank) { 613 | // 位置在种子后面 614 | $(parent).find(".csgo_value>.wear-value:first").append("磨损排名: " + rank.innerText.match(/\d{1,}/)[0] + ""); 615 | // 位置在磨损后面 616 | // $(origin_float).html(origin_float.innerHTML + "「#" + rank.innerText.match(/\d{1,}/)[0] + ""); 617 | } 618 | }, 619 | error: function (msg) { 620 | if (msg.status == 429) { 621 | msg.statusText = "请求太频繁"; 622 | } 623 | console.log("error:", msg); 624 | let origin_float = $(parent).find(".wear-value")[0]; 625 | $(origin_float).before("
    " + msg.statusText + "
    "); 626 | } 627 | }); 628 | } 629 | 630 | }; 631 | 632 | function initHelper() { 633 | if ($(".floatbar>ul").length == 0) { 634 | setTimeout(() => { initHelper(); }, 100); 635 | return; 636 | } 637 | if ($("#buff_tool_nextpage").length != 0) { return; } 638 | if (!GM_getValue("helper_alert_first")) { 639 | $("body").append('

    你应该是第一次安装“网易BUFF价格比例(找挂刀)插件” 本插件完全免费,让你付费购买的都是骗子。请熟知。

    '); 640 | let count = 5; 641 | let countDown = setInterval(function () { 642 | if (--count == 0) { 643 | clearInterval(countDown); 644 | $(".agreementsCountDown").remove(); 645 | } else { 646 | $(".agreementsCountDown").text(count); 647 | } 648 | }, 1000); 649 | $(".agreementsBtn").click(function () { 650 | if (!count) { 651 | GM_setValue("helper_alert_first", true); 652 | $("#j_w-Toast").hide("normal", () => { 653 | $("#j_w-Toast").remove(); 654 | }); 655 | } else { 656 | alert("认真看一会,还有" + count + "秒就可以点了"); 657 | } 658 | }); 659 | } 660 | // 设置按钮 661 | $(".floatbar>ul").prepend("
  • 设置

  • "); 662 | $("#buff_tool_setting").click(function () { 663 | openSettingPanel(); 664 | }).parent().css("cursor", "pointer"); 665 | // 下一页按钮 666 | $(".floatbar>ul").prepend("
  • 下一页

  • "); 667 | $("#buff_tool_nextpage").click(function () { 668 | $(".page-link.next").click(); 669 | $("#sort_scale").removeClass(); 670 | }).parent().css("cursor", "pointer"); 671 | // 初始化设置页面 672 | $("#helper-version").text($("#helper-version").text() + GM_info.script.version); 673 | $("#helper-setting-checkBtn").click(() => { checkSteamConnection() }); 674 | $("#helper-setting-resetAll").click(() => { resetConfig(); }); 675 | $(".helper-setting-shadow").click(function (e) { 676 | if (e.target == this) { 677 | $(this).fadeOut(); 678 | } 679 | }); 680 | // 添加设置页面操作 681 | $(".helper-setting").change(function (e) { 682 | let target = e.target; 683 | let optionTarget = target.dataset.optionTarget; 684 | let val = target.getAttribute("value") ? target.getAttribute("value") : target.value; 685 | helper_config[optionTarget] = val; 686 | if (optionTarget == "steamCurrency" && g_rgCurrencyData[val].eCurrencyCode != 23) { 687 | let toast = showMessage(`正在获取${val}的汇率`, "访问时间取决于steam访问速度,期间请不要关闭页面", "info", 20000); 688 | updateRate(1, toast); 689 | } else { 690 | GM_setValue("helper_config", helper_config); 691 | } 692 | init(); 693 | }); 694 | // 注册管理工具菜单 695 | GM_registerMenuCommand('打开设置面板', () => { 696 | openSettingPanel(); 697 | }); 698 | GM_registerMenuCommand('插件官网', () => { 699 | window.open("https://greasyfork.org/zh-CN/scripts/410137"); 700 | }); 701 | // 初始化设置页面后填装面板 702 | init(); 703 | } 704 | 705 | function openSettingPanel() { 706 | updateSteamStatus(); 707 | $(".helper-setting-shadow").css({ 708 | "opacity": 0, 709 | "display": "flex" 710 | }).animate({ opacity: '1' }, 300); 711 | } 712 | 713 | function loadConfig() { 714 | let config = GM_getValue("helper_config"); 715 | if (config && Object.keys(config).length) { 716 | // 旧版更新到新版导致无数据 717 | config.pageSize = config.pageSize ? config.pageSize : 20; 718 | return config; 719 | } 720 | return clone(DEFAULT_CONFIG); 721 | } 722 | 723 | function resetConfig() { 724 | GM_setValue("helper_config", null); 725 | GM_setValue("exchangeRate", null); 726 | GM_setValue("top_bookmarked-warning", null); 727 | helper_config = clone(DEFAULT_CONFIG); 728 | init(); 729 | showMessage("重置成功", "插件已恢复初始设定", "info", 2000); 730 | } 731 | 732 | function initCurrency() { 733 | for (let key in g_rgCurrencyData) { 734 | $(".steam-currency-selector").append("
  • " + g_rgCurrencyData[key].strCode + "(" + g_rgCurrencyData[key].strSymbol + ")
  • "); 735 | } 736 | syncCurrency(); 737 | if (steamCurrency.eCurrencyCode != 23) { 738 | updateRate(); 739 | } 740 | } 741 | 742 | function init() { 743 | $(".helper-setting>.list_tb .on").removeClass("on"); 744 | 745 | if (helper_config.currencyEffectCalculate) { 746 | $("#helper-setting-currencyEffectCalculate").attr("value", helper_config.currencyEffectCalculate).children(":first").addClass("on"); 747 | } 748 | if (helper_config.overrideSortRule) { 749 | $("#helper-setting-stickerSort").attr("value", helper_config.overrideSortRule).children(":first").addClass("on"); 750 | } 751 | if (helper_config.sortAfterAllDone) { 752 | $("#helper-setting-sortAfterAllDone").attr("value", helper_config.sortAfterAllDone).children(":first").addClass("on"); 753 | } 754 | if (helper_config.orderFloatLeft) { 755 | $("#helper-setting-orderFloatLeft").attr("value", helper_config.orderFloatLeft).children(":first").addClass("on"); 756 | $(".market_commodity_orders_table").addClass("order_float_left"); 757 | } else { 758 | $(".market_commodity_orders_table").removeClass("order_float_left"); 759 | } 760 | if (helper_config.reverseSticker) { 761 | $("#helper-setting-reverseSticker").attr("value", helper_config.reverseSticker).children(":first").addClass("on"); 762 | } 763 | reverseStickers(helper_config.reverseSticker); 764 | syncSort(); 765 | $("#helper-setting-pageSize").val(helper_config.pageSize); 766 | $("#helper-setting-buffSellThreshold").val(helper_config.buffSellThreshold); 767 | $("#helper-setting-maxRange").val(helper_config.maxRange); 768 | $("#helper-setting-minRange").val(helper_config.minRange); 769 | $("#helper-setting-marketColorLow").val(helper_config.marketColorLow); 770 | $("#helper-setting-marketColorHigh").val(helper_config.marketColorHigh); 771 | updateSteamStatus(); 772 | syncCurrency(); 773 | parseColor(); 774 | } 775 | 776 | function initSortBtn() { 777 | $(".block-header>.l_Right").append($('

    比例排序

    • 默认
    • buff比例从低到高
    • buff比例从高到低
    • 求购比例从低到高
    • 求购比例从高到低
    ')); 778 | var sortBtnTimeout; 779 | $(".buff-helper-sort").click(function () { 780 | $(this).addClass("on"); 781 | clearTimeout(sortBtnTimeout); 782 | }).mouseleave(function () { 783 | let t = $(this); 784 | if (t.hasClass("on")) { 785 | sortBtnTimeout = setTimeout(() => t.removeClass("on"), 300); 786 | } 787 | }); 788 | $(".buff-helper-sort li").click(function (e) { 789 | e.stopPropagation(); 790 | needSort = this.dataset.value; 791 | if (this.dataset.value == "null") { 792 | $("#helper-sort-text").text("比例排序"); 793 | sortGoods("data-default-sort", true); 794 | } else { 795 | $("#helper-sort-text").text(this.innerText); 796 | let arr = this.dataset.value.split("_"); 797 | sortGoods("data-" + arr[0], arr[1] == "asc"); 798 | } 799 | $(".buff-helper-sort").removeClass("on"); 800 | }); 801 | syncSort(); 802 | setTimeout(() => { 803 | // 修改buff排序时重置比例排序规则 804 | $("div[name='sort_by']").change(function () { 805 | if (helper_config.overrideSortRule && this.getAttribute("value")) { 806 | needSort = this.dataset.value; 807 | $("#helper-sort-text").text("默认"); 808 | } 809 | }); 810 | }, 500); 811 | } 812 | 813 | function syncSort() { 814 | needSort = helper_config.needSort; 815 | $("#helper-setting-sortRule>h3").text($("#helper-setting-sortRule li[value=" + helper_config.needSort + "]").addClass("on").text()); 816 | $("#helper-sort-text").text($(".buff-helper-sort li[data-value=" + helper_config.needSort + "]").click().text()); 817 | } 818 | 819 | function reverseStickers(isLeft) { 820 | $(".sticker-cont").css("float", isLeft ? "right" : "left"); // 没写错 821 | } 822 | 823 | function updateSteamStatus() { 824 | if (steamConnection === undefined) { 825 | } else if (steamConnection) { 826 | if (!$(".helper-setting-steamConnection>.c_Green").text()) { 827 | $(".helper-setting-steamConnection").html("正常"); 828 | } 829 | } else { 830 | $(".helper-setting-steamConnection").html("无法连接"); 831 | } 832 | } 833 | 834 | function syncCurrency() { 835 | steamCurrency = g_rgCurrencyData[helper_config.steamCurrency]; 836 | $("#helper-setting-currency").attr("value", steamCurrency.strCode); 837 | $("#helper-setting-currency>h3").text($("#helper-setting-currency li[value=" + steamCurrency.strCode + "]").addClass("on").text()); 838 | } 839 | 840 | function parseColor() { 841 | market_color_high = helper_config.marketColorHigh.match(/[0-9a-f]{2}/ig); 842 | market_color_low = helper_config.marketColorLow.match(/[0-9a-f]{2}/ig); 843 | for (let i = 2; i >= 0; i--) { 844 | market_color_high[i] = parseInt(market_color_high[i], 16); 845 | market_color_low[i] = parseInt(market_color_low[i], 16); 846 | } 847 | } 848 | 849 | function sortGoods(sortRule, isAsc) { 850 | $("#j_list_card>ul>li").sort(function (a, b) { 851 | let av = $(a).attr(sortRule) - 0; 852 | let bv = $(b).attr(sortRule) - 0; 853 | let result = 0; 854 | if (isAsc) { 855 | result = av - bv; 856 | } else { 857 | result = bv - av; 858 | } 859 | return result === NaN ? 0 : result; 860 | }).appendTo("#j_list_card>ul"); 861 | } 862 | 863 | function checkSteamConnection() { 864 | let interval = 0; 865 | $(".helper-setting-steamConnection").html("检测中"); 866 | $("#helper-setting-checkBtn").css("visibility", "hidden"); 867 | let startTime = new Date().getTime(); 868 | let endTime = 0; 869 | steamConnection = undefined; 870 | GM_xmlhttpRequest({ 871 | url: "https://steamcommunity.com/market/", 872 | timeout: ajaxTimeout, 873 | method: "get", 874 | onloadstart: function (event) { 875 | countdown(19); 876 | }, 877 | onload: function (res) { 878 | if (res && res.status == 200) { 879 | endTime = new Date().getTime(); 880 | changeSteamStatus(true); 881 | } else { 882 | console.log("检测steam连接性出错:状态错误", res); 883 | changeSteamStatus(false); 884 | } 885 | }, 886 | onerror: function (err) { 887 | console.log("检测steam连接性出错:连接错误", err); 888 | changeSteamStatus(false); 889 | }, 890 | ontimeout: function () { 891 | console.log("检测steam连接性出错:尝试超时"); 892 | changeSteamStatus(false); 893 | } 894 | }); 895 | 896 | function changeSteamStatus(status) { 897 | clearInterval(interval); 898 | $(".steamConnectionCountdown").hide(); 899 | steamConnection = status; 900 | if (status) { 901 | $(".helper-setting-steamConnection").html("正常" + (endTime - startTime) + "ms"); 902 | } else { 903 | $(".helper-setting-steamConnection").html("无法连接"); 904 | } 905 | $("#helper-setting-checkBtn").css("visibility", "visible"); 906 | } 907 | 908 | function countdown(count) { 909 | $(".steamConnectionCountdown").text("20s").show(); 910 | interval = setInterval(() => { 911 | $(".steamConnectionCountdown").text(count-- + "s"); 912 | }, 1000); 913 | } 914 | } 915 | 916 | function failedSteamConnection() { 917 | if (++steamFailedTimes > (itemNum >> 2)) { 918 | steamConnection = false; 919 | } 920 | } 921 | 922 | function updateProgressBar(ID) { 923 | let bar = $("#helper-progress-bar-" + ID); 924 | bar.width(++itemCount / itemNum * 100 + "%") 925 | if (itemCount >= itemNum) { 926 | itemCount = 0; 927 | $("#helper-loading-" + ID).remove(); 928 | bar.fadeOut(500); 929 | } 930 | } 931 | 932 | function paintingGradient(scale, target, position, template = '') { 933 | let red = gradient(market_color_high[0], market_color_low[0], scale); 934 | let green = gradient(market_color_high[1], market_color_low[1], scale); 935 | let blue = gradient(market_color_high[2], market_color_low[2], scale); 936 | switch (position) { 937 | case 1: 938 | $(target).before($(template).css("color", "rgb(" + red + "," + green + "," + blue + ")").text(scale)); 939 | break; 940 | case 2: 941 | $(target).prepend($(template).css("color", "rgb(" + red + "," + green + "," + blue + ")").text(scale)); 942 | break; 943 | case 3: 944 | $(target).append($(template).css("color", "rgb(" + red + "," + green + "," + blue + ")").text(scale)); 945 | break; 946 | case 4: 947 | $(target).after($(template).css("color", "rgb(" + red + "," + green + "," + blue + ")").text(scale)); 948 | break; 949 | default: 950 | $(target).append($(template).css("color", "rgb(" + red + "," + green + "," + blue + ")").text(scale)); 951 | } 952 | } 953 | 954 | // 用来检测是否安装了其他buff插件,安装了就对布局做出相应调整防止排版混乱 955 | function daemonThread() { 956 | let count = 30 957 | let daemonThreadInterval = setInterval(() => { 958 | if (count--) { 959 | if ($(".afkout").length || $("#infolist").length) { 960 | $("#steam_order").remove(); 961 | $(".detail-summ>a").show(); 962 | $(".steam-link").hide(); 963 | clearInterval(daemonThreadInterval); 964 | } 965 | } else { 966 | clearInterval(daemonThreadInterval); 967 | } 968 | }, 100); 969 | } 970 | 971 | // json only 972 | function clone(obj) { 973 | return JSON.parse(JSON.stringify(obj)); 974 | } 975 | 976 | // 小数: "167639.87", "167639", ".87", "87" 977 | // 整数: "186267", "186267" 978 | function convertPrice(str) { 979 | str = str.replace(steamCurrency.strThousandsSeparator, ""); 980 | if (steamCurrency.strDecimalSymbol !== ".") { 981 | str = str.replace(steamCurrency.strDecimalSymbol, "."); 982 | } 983 | return str.match(/(\d+)(\.(\d{1,2}))?/); 984 | } 985 | 986 | function addCurrencySymbol(origin, currencyCode) { 987 | let currencyData = g_rgCurrencyData[currencyCode]; 988 | if (currencyData.bSymbolIsPrefix) { 989 | return currencyData.strSymbol + currencyData.strSymbolAndNumberSeparator + origin; 990 | } else { 991 | return origin + currencyData.strSymbolAndNumberSeparator + currencyData.strSymbol; 992 | } 993 | } 994 | 995 | // Foreign exchange to Chinese Yuan 996 | function FtoC(valueInCents) { 997 | if (steamCurrency.eCurrencyCode != 23 && (!helper_config.currencyEffectCalculate)) { 998 | return valueInCents * exchangeRate.FtoC; 999 | } 1000 | return valueInCents; 1001 | } 1002 | // Chinese Yuan to Foreign exchange 1003 | function CtoF(valueInCents) { 1004 | if (steamCurrency.eCurrencyCode != 23 && (!helper_config.currencyEffectCalculate)) { 1005 | return valueInCents * exchangeRate.CtoF; 1006 | } 1007 | return valueInCents; 1008 | } 1009 | 1010 | function getScale(sellerPrice, buyerPriceInCents) { 1011 | let amount = calculateFeeAmount(buyerPriceInCents); 1012 | return (sellerPrice / v_currencyformat(amount.amount - amount.fees)).toFixed(2); 1013 | } 1014 | 1015 | // symbolType 0, 1, 2 1016 | // eg. originPrice = 4907856 (ARS, value in cents) 1017 | // 0: 49078.56 convert to float 1018 | // 1: ARS$ 49078.56 float with symbol 1019 | // 2: ARS$ 49.078,56 locale string 1020 | function getWithoutFeePrice(originPriceInCents, symbolType = 0, currencyCode = steamCurrency.strCode) { 1021 | let amount = calculateFeeAmount(originPriceInCents); 1022 | switch (symbolType) { 1023 | case 0: 1024 | return v_currencyformat(amount.amount - amount.fees); 1025 | case 1: 1026 | return addCurrencySymbol(v_currencyformat(amount.amount - amount.fees), currencyCode); 1027 | case 2: 1028 | return v_currencyformat(amount.amount - amount.fees, currencyCode); 1029 | } 1030 | } 1031 | 1032 | function showMessage(title, msg, type = "info", time = 5000, position = 'top-right') { 1033 | return $.toast({ 1034 | text: msg, 1035 | heading: title, 1036 | icon: type, 1037 | showHideTransition: 'fade', // fade, slide or plain 1038 | allowToastClose: true, 1039 | hideAfter: time, // false to make it sticky or number representing the miliseconds as time after which toast needs to be hidden 1040 | stack: 5, // false if there should be only one toast at a time or a number representing the maximum number of toasts to be shown at a time 1041 | position: position, // bottom-left or bottom-right or bottom-center or top-left or top-right or top-center or mid-center or an object representing the left, right, top, bottom values 1042 | textAlign: 'left', // Text alignment i.e. left, right or center 1043 | // loader: false, // Whether to show loader or not. True by default 没看懂loader什么意思¯\(°_o)/¯ 1044 | // loaderBg: '#9EC600', // Background color of the toast loader 1045 | // beforeShow: function () {}, // will be triggered before the toast is shown 1046 | // afterShown: function () {}, // will be triggered after the toat has been shown 1047 | // beforeHide: function () {}, // will be triggered before the toast gets hidden 1048 | // afterHidden: function () {} // will be triggered after the toast has been hidden 1049 | }); 1050 | } 1051 | 1052 | function gradient(max, min, f) { 1053 | if (f == "∞") { return max; } 1054 | if (f >= helper_config.maxRange || f <= helper_config.minRange) { 1055 | f = f >= helper_config.maxRange ? 1 : 0; 1056 | } else { 1057 | f = (f - helper_config.minRange) / (helper_config.maxRange - helper_config.minRange); 1058 | } 1059 | return max >= min ? f * (max - min) + min : (1 - f) * (min - max) + max; 1060 | } 1061 | 1062 | function getGoodsId() { 1063 | let result = location.pathname.match(/\/goods\/(\d+)/); 1064 | if (result) return result[1]; return null; 1065 | } 1066 | 1067 | function escape(englishName) { 1068 | return encodeURIComponent(englishName).replaceAll("(", "%28").replaceAll(")", "%29"); 1069 | } 1070 | 1071 | // --------------------- copy from steam ----------------------- 1072 | // 售价算税 1073 | function calculateFeeAmount(amount) { 1074 | if (!g_rgWalletInfo['wallet_fee']) 1075 | return 0; 1076 | 1077 | var publisherFee = (typeof g_rgWalletInfo['wallet_publisher_fee_percent_default'] == 'undefined') ? 0 : g_rgWalletInfo['wallet_publisher_fee_percent_default']; 1078 | 1079 | // Since CalculateFeeAmount has a Math.floor, we could be off a cent or two. Let's check: 1080 | var iterations = 0; // shouldn't be needed, but included to be sure nothing unforseen causes us to get stuck 1081 | var nEstimatedAmountOfWalletFundsReceivedByOtherParty = parseInt((amount - parseInt(g_rgWalletInfo['wallet_fee_base'])) / (parseFloat(g_rgWalletInfo['wallet_fee_percent']) + parseFloat(publisherFee) + 1)); 1082 | 1083 | var bEverUndershot = false; 1084 | var fees = CalculateAmountToSendForDesiredReceivedAmount(nEstimatedAmountOfWalletFundsReceivedByOtherParty, publisherFee); 1085 | while (fees.amount != amount && iterations < 10) { 1086 | if (fees.amount > amount) { 1087 | if (bEverUndershot) { 1088 | fees = CalculateAmountToSendForDesiredReceivedAmount(nEstimatedAmountOfWalletFundsReceivedByOtherParty - 1, publisherFee); 1089 | fees.steam_fee += (amount - fees.amount); 1090 | fees.fees += (amount - fees.amount); 1091 | fees.amount = amount; 1092 | break; 1093 | } 1094 | else { 1095 | nEstimatedAmountOfWalletFundsReceivedByOtherParty--; 1096 | } 1097 | } 1098 | else { 1099 | bEverUndershot = true; 1100 | nEstimatedAmountOfWalletFundsReceivedByOtherParty++; 1101 | } 1102 | 1103 | fees = CalculateAmountToSendForDesiredReceivedAmount(nEstimatedAmountOfWalletFundsReceivedByOtherParty, publisherFee); 1104 | iterations++; 1105 | } 1106 | 1107 | // fees.amount should equal the passed in amount 1108 | return fees; 1109 | 1110 | function CalculateAmountToSendForDesiredReceivedAmount(receivedAmount, publisherFee) { 1111 | if (!g_rgWalletInfo['wallet_fee']) { 1112 | return receivedAmount; 1113 | } 1114 | 1115 | publisherFee = (typeof publisherFee == 'undefined') ? 0 : publisherFee; 1116 | 1117 | var nSteamFee = parseInt(Math.floor(Math.max(receivedAmount * parseFloat(g_rgWalletInfo['wallet_fee_percent']), g_rgWalletInfo['wallet_fee_minimum']) + parseInt(g_rgWalletInfo['wallet_fee_base']))); 1118 | var nPublisherFee = parseInt(Math.floor(publisherFee > 0 ? Math.max(receivedAmount * publisherFee, 1) : 0)); 1119 | var nAmountToSend = receivedAmount + nSteamFee + nPublisherFee; 1120 | 1121 | return { 1122 | steam_fee: nSteamFee, 1123 | publisher_fee: nPublisherFee, 1124 | fees: nSteamFee + nPublisherFee, 1125 | amount: parseInt(nAmountToSend) 1126 | }; 1127 | } 1128 | } 1129 | // 小数点左移两位,并且加货币符号(可选) 1130 | function v_currencyformat(valueInCents, currencyCode) { 1131 | var currencyFormat = `${parseInt(valueInCents = Math.abs(+valueInCents / 100 || 0).toFixed(2), 10)}`; 1132 | 1133 | if (g_rgCurrencyData[currencyCode]) { 1134 | var currencyData = g_rgCurrencyData[currencyCode]; 1135 | 1136 | const j = (currencyFormat.length > 3 ? currencyFormat.length % 3 : 0); 1137 | const thousand_formatted = `${j ? currencyFormat.substr(0, j) + currencyData.strThousandsSeparator : ''}${currencyFormat.substr(j).replace(/(\d{3})(?=\d)/g, `$1${currencyData.strThousandsSeparator}`)}`; 1138 | const decimal_formatted = `${currencyData.strDecimalSymbol}${Math.abs(valueInCents - currencyFormat).toFixed(2).slice(2)}`; 1139 | const formatted = `${thousand_formatted}${currencyData.bWholeUnitsOnly ? decimal_formatted.replace(`${currencyData.strDecimalSymbol}00`, '') : decimal_formatted}`; 1140 | 1141 | var currencyReturn = currencyData.bSymbolIsPrefix 1142 | ? `${currencyData.strSymbol}${currencyData.strSymbolAndNumberSeparator}${formatted}` 1143 | : `${formatted}${currencyData.strSymbolAndNumberSeparator}${currencyData.strSymbol}`; 1144 | 1145 | if (currencyCode == 'USD') { 1146 | return currencyReturn + ' USD'; 1147 | } 1148 | else if (currencyCode == 'EUR') { 1149 | return currencyReturn.replace(',00', ',--'); 1150 | } 1151 | else { 1152 | return currencyReturn; 1153 | } 1154 | } 1155 | else { 1156 | return valueInCents; 1157 | } 1158 | } 1159 | // ---------------------- end ------------------------ 1160 | 1161 | function errorTranslator(err) { 1162 | const msg = { 1163 | "0": "访问steam失败,请检查网络连接性", 1164 | "200": "无法处理结果,结果集无法使用", 1165 | "400": "请求参数错误,服务器无法理解参数", 1166 | "404": "页面不存在,无法找到请求的资源", 1167 | "408": "访问steam超时,请检查网络连接性", 1168 | "429": "请求次数过多,饮个茶再来吧", 1169 | "500": "服务器内部错误,请稍后重试" 1170 | }; 1171 | const shortMsg = { 1172 | "0": "无网络", 1173 | "200": "请重试", 1174 | "400": "参数错误", 1175 | "404": "无内容", 1176 | "408": "超时", 1177 | "429": "频繁", 1178 | "500": "请重试" 1179 | }; 1180 | switch (err.status) { 1181 | case 0: 1182 | failedSteamConnection(); 1183 | break; 1184 | case 429: 1185 | steamConnection = true; 1186 | break; 1187 | } 1188 | err.statusText = msg[err.status]; 1189 | err.statusTextShort = shortMsg[err.status]; 1190 | return err; 1191 | } 1192 | 1193 | function updateRate(force, toast) { 1194 | if ((!force) && exchangeRate && exchangeRate.time_next_update_unix > Date.now()) { 1195 | return; 1196 | } 1197 | if ((!steamConnection) && steamConnection != undefined) { 1198 | toast && toast.reset(); 1199 | showMessage("无网络时无法获取汇率", "没有设置被改变", 'warning'); 1200 | return; 1201 | } 1202 | GM_xmlhttpRequest({ 1203 | // 10000元锚点 1204 | url: `https://steamcommunity.com/market/listings/730/Souvenir%20Sawed-Off%20|%20Snake%20Camo%20(Well-Worn)/render/?query=&start=40&count=100¤cy=${g_rgCurrencyData[helper_config.steamCurrency].eCurrencyCode}`, 1205 | // 热门锚点 1206 | // url: `https://steamcommunity.com/market/listings/730/AK-47%20%7C%20Asiimov%20%28Field-Tested%29/render/?start=0&count=50¤cy=${g_rgCurrencyData[helper_config.steamCurrency].eCurrencyCode}`, 1207 | url: `https://steamcommunity.com/market/listings/730/AK-47%20%7C%20Redline%20%28Field-Tested%29/render/?start=0&count=50¤cy=${g_rgCurrencyData[helper_config.steamCurrency].eCurrencyCode}`, 1208 | method: "get", 1209 | timeout: ajaxTimeout, 1210 | onload: function (response) { 1211 | toast && toast.reset(); 1212 | let data = response.status == 200 ? JSON.parse(response.responseText) : {}; 1213 | // if (data.success && data.listinginfo["3296062994072312107"]) { 1214 | // if (data.listinginfo["3296062994072312107"].converted_currencyid % 2000 != g_rgCurrencyData[helper_config.steamCurrency].eCurrencyCode) { 1215 | // return; // 对结果返回前的多次操作进行屏蔽,只取最后一次的结果 1216 | // } 1217 | // let timeUnix = Date.now(); 1218 | // exchangeRate = { 1219 | // FtoC: (data.listinginfo["3296062994072312107"].price / data.listinginfo["3296062994072312107"].converted_price).toFixed(6), 1220 | // CtoF: (data.listinginfo["3296062994072312107"].converted_price / data.listinginfo["3296062994072312107"].price).toFixed(6), 1221 | // currencyCode: g_rgCurrencyData[helper_config.steamCurrency].strCode, 1222 | // time_next_update_unix: timeUnix + 10800000, 1223 | // time_update_unix: timeUnix 1224 | // } 1225 | // GM_setValue("exchangeRate", exchangeRate); 1226 | // GM_setValue("helper_config", helper_config); 1227 | // showMessage("获取汇率成功", `已经同步${helper_config.steamCurrency}的最新汇率`, "success"); 1228 | // return; 1229 | // } 1230 | // in case of emergency 1231 | // 找到人民币上架的记录,直接通过原货币和目标货币获取汇率 1232 | if (data.success) { 1233 | for (let key in data.listinginfo) { 1234 | if (data.listinginfo[key].currencyid == 2023) { 1235 | if (data.listinginfo[key].converted_currencyid % 2000 != g_rgCurrencyData[helper_config.steamCurrency].eCurrencyCode) {return;} 1236 | let timeUnix = Date.now(); 1237 | exchangeRate = { 1238 | FtoC: (data.listinginfo[key].price / data.listinginfo[key].converted_price).toFixed(6), 1239 | CtoF: (data.listinginfo[key].converted_price / data.listinginfo[key].price).toFixed(6), 1240 | currencyCode: g_rgCurrencyData[helper_config.steamCurrency].strCode, 1241 | time_next_update_unix: timeUnix + 10800000, 1242 | time_update_unix: timeUnix 1243 | } 1244 | GM_setValue("exchangeRate", exchangeRate); 1245 | GM_setValue("helper_config", helper_config); 1246 | showMessage("获取汇率成功", `已经同步${helper_config.steamCurrency}的最新汇率`, "success"); 1247 | return; 1248 | } 1249 | } 1250 | } 1251 | console.log("获取汇率时错误:", response); 1252 | showMessage("获取汇率时错误", errorTranslator(response).statusText, 'error'); 1253 | }, 1254 | onerror: function (err) { 1255 | console.log("获取汇率失败:", err); 1256 | showMessage("获取汇率失败", errorTranslator(err).statusText, 'error'); 1257 | }, 1258 | ontimeout: function () { 1259 | failedSteamConnection(); 1260 | let err = { "status": 408, "statusText": "连接steam超时,请检查steam市场连接性" }; 1261 | console.log("获取汇率超时:", err); 1262 | showMessage("获取汇率超时", err.statusText, 'error'); 1263 | } 1264 | }); 1265 | } 1266 | 1267 | function getItemId(buff_item_id, steamLink) { 1268 | return new Promise(function (resolve, reject) { 1269 | let steam_item_id = GM_getValue(buff_item_id); 1270 | if (steam_item_id) { 1271 | resolve(steam_item_id); 1272 | return; 1273 | } else if (steam_item_id === null) { 1274 | reject({ status: 404, statusText: "物品不在货架上" }); 1275 | } 1276 | GM_xmlhttpRequest({ 1277 | url: steamLink, 1278 | timeout: ajaxTimeout, 1279 | method: "get", 1280 | onload: function (res) { 1281 | if (res.status == 200) { 1282 | let html = res.responseText; // 页面很大 1283 | try { 1284 | steam_item_id = /Market_LoadOrderSpread\(\s?(\d+)\s?\)/.exec(html)[1]; 1285 | } catch (error) { 1286 | steamConnection = true; 1287 | GM_setValue(buff_item_id, null); 1288 | res.status = 404; 1289 | res.statusText = "物品不在货架上"; 1290 | console.log("获取itemID状态异常:", res); 1291 | reject(res); 1292 | return; 1293 | } 1294 | GM_setValue(buff_item_id, steam_item_id); 1295 | resolve(steam_item_id); 1296 | } else { 1297 | console.log("获取itemID状态异常:", res); 1298 | reject(errorTranslator(res)); 1299 | } 1300 | }, 1301 | onerror: function (err) { 1302 | console.log("获取itemID错误:", err); 1303 | reject(errorTranslator(err)); 1304 | }, 1305 | ontimeout: function () { 1306 | failedSteamConnection(); 1307 | let err = { "status": 408, "statusText": "连接steam超时,请检查steam市场连接性" }; 1308 | console.log("获取itemID超时:", err); 1309 | reject(err); 1310 | } 1311 | }); 1312 | }); 1313 | } 1314 | 1315 | function getSteamOrderList(buff_item_id, steamLink) { 1316 | return new Promise(function (resolve, reject) { 1317 | if ((!steamConnection) && steamConnection != undefined) { 1318 | let err = { "status": 408, "statusText": "无法访问steam" }; 1319 | resolve(err); 1320 | return; 1321 | } 1322 | getItemId(buff_item_id, steamLink).then(function onFulfilled(steam_item_id) { 1323 | GM_xmlhttpRequest({ 1324 | url: `https://steamcommunity.com/market/itemordershistogram?country=CN&language=schinese¤cy=${steamCurrency.eCurrencyCode}&item_nameid=${steam_item_id}&two_factor=0`, 1325 | timeout: ajaxTimeout, 1326 | headers: { 1327 | "referer": steamLink, 1328 | "X-Requested-With": "XMLHttpRequest", 1329 | "Host": "steamcommunity.com", 1330 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.35" 1331 | }, 1332 | method: "get", 1333 | onload: function (res) { 1334 | if (res.status == 200) { 1335 | steamConnection = true; 1336 | resolve(JSON.parse(res.responseText)); 1337 | return; 1338 | } 1339 | console.log("访问steamorder状态异常:", res); 1340 | resolve(errorTranslator(res)); 1341 | }, 1342 | onerror: function (err) { 1343 | console.log("访问steamorder列表出错:", err); 1344 | resolve(errorTranslator(err)); 1345 | }, 1346 | ontimeout: function () { 1347 | failedSteamConnection(); 1348 | let err = { "status": 408, "statusText": "连接steam超时,请检查steam市场连接性" }; 1349 | console.log("访问steamorder列表超时:", err); 1350 | resolve(err); 1351 | } 1352 | }); 1353 | }).catch(function onRejected(err) { 1354 | resolve(err); 1355 | }); 1356 | }); 1357 | } 1358 | 1359 | function getSteamSoldNumber(app_id, hash_name) { 1360 | return new Promise(function (resolve) { 1361 | if ((!steamConnection) && steamConnection != undefined) { 1362 | let err = { "status": 408, "statusText": "无法访问steam" }; 1363 | resolve(err); 1364 | return; 1365 | } 1366 | GM_xmlhttpRequest({ 1367 | url: `https://steamcommunity.com/market/priceoverview/?appid=${app_id}¤cy=${steamCurrency.eCurrencyCode}&market_hash_name=${hash_name}`, 1368 | timeout: ajaxTimeout, 1369 | headers: { 1370 | "referer": `https://steamcommunity.com/market/listings/${app_id}/${hash_name}`, 1371 | "X-Requested-With": "XMLHttpRequest", 1372 | "Host": "steamcommunity.com", 1373 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.35" 1374 | }, 1375 | method: "get", 1376 | onload: function (res) { 1377 | if (res.status == 200) { 1378 | steamConnection = true; 1379 | let json = JSON.parse(res.responseText); 1380 | if (json.success) { 1381 | resolve(json); 1382 | return; 1383 | } 1384 | } 1385 | console.log("访问steam销售数量状态异常:", res); 1386 | resolve(errorTranslator(res)); 1387 | }, 1388 | onerror: function (err) { 1389 | console.log("访问steam销售数量出错:", err); 1390 | resolve(errorTranslator(err)); 1391 | }, 1392 | ontimeout: function () { 1393 | failedSteamConnection(); 1394 | let err = { "status": 408, "statusText": "连接steam超时,请检查steam市场连接性" }; 1395 | console.log("访问steam销售数量超时:", err); 1396 | resolve(err); 1397 | } 1398 | }); 1399 | }); 1400 | } 1401 | 1402 | })(); -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 |

    插件是免费的,用来省钱的,想用来赚钱的韭菜们可以继续开花

    2 |

    注:buff与steam均有反爬机制,请节制使用

    3 | # [更新日志][githubCommits]|[插件介绍](#intro)|[常见问题与解决办法](#support) 4 | 5 | --- 6 | ## 感谢这些人的帮助与贡献 7 | | | | 8 | | ----------------------------------------- | ---------------------------------- | 9 | | **@lyl001** | `提供信息帮助实现每页数量选择功能` | 10 | | [**Gear Browser**][contributors-gearApp] | `提供正则修改建议` | 11 | | [**Bitaminkim**][contributors-bitaminkim] | `提供steam地区与货币转换的实现` | 12 | | **Kylin** | `建议比例列加入求购比例` | 13 | --- 14 | ## 本插件有以下功能 15 | 16 | ### 在市场列表页: ([**完整图示1**][photo1]) 17 | - **显示饰品的挂刀比例①、挂刀后的实际可得②、steam求购人数③、求购的挂刀比例④** 18 | - **根据颜色区分比例高低,且颜色可以自定义** 19 | ![1-1图示][iconograph1-1] 20 | - **依据饰品的比例/挂刀比例进行从高到低/从低到高排序** 21 | ![1-2图示][iconograph1-2] 22 | - **右侧悬浮栏添加巨大下一页按钮,不用拉到底部就可翻页** 23 | - **右侧悬浮栏添加设置按钮,可以自定义一些属性** 24 | ![1-3图示][iconograph1-3] 25 | - **`调整每页显示数量(风险功能,建议修改前查看说明)`** 26 | 27 | ### 在饰品详情页: ([**完整图示2**][photo2]) 28 | - **显示饰品的挂刀比例①、挂刀后的实际可得②、求购人数③、价格④、比例⑤等** 29 | - **steam过去24小时的销量显示⑥** 30 | ![2-1图示][iconograph2-1] 31 | - **steam求购列表的简单表格,防止丢求购时采坑** 32 | ![2-2图示][iconograph2-2] 33 | - **每个饰品的预览区域变大,点击图片即可查看检视图** 34 | ![2-3图示][iconograph2-3] 35 | - **增大饰品的贴纸信息,鼠标放上可以查看大图** 36 | ![2-4图示][iconograph2-4] 37 | - **倒转贴纸显示,与枪上顺序相同(需在设置面板内开启)** 38 | - **将饰品的图案模板(seed)、改名、磨损排名(如果有的话)直接显示出来** 39 | ![2-5图示][iconograph2-5] 40 | - **修改支付方式图标与位置,更直观的展示支持的支付方式** 41 | ![2-6图示][iconograph2-6] 42 | 43 | ### 我还有个设置面板 ([**完整图示3**][photo3]) 44 | - **用来调整参考货币** 45 | - **其他功能的相关设定** 46 | 47 | --- 48 | ## **故障自查,请找到对应的问题后按顺序排查** 49 | 1. **我不是挂刀用的/我是steam卖到buff,这种情况插件怎么用?** 50 | 1. 我怎么知道? 51 | 2. **我不会安装/安装不上,报错** 52 | 1. 点安装旁边的问号 53 | 3. **没有安装、页面不是中文** 54 | 1. 右上角切换中文 55 | 4. **插件没有运行** 56 | 1. 不要在首页测试了 57 | 2. 也不要在热门关注里测试 58 | 3. 不要使用Greasemonkey,改用Tampermonkey和Violentmonkey都可以 59 | 5. **提示我请求次数过多** 60 | 1. 拿使用插件的浏览器登录网页版steam(账号须可交易) 61 | 2. 加速器换个节点(IP) 62 | 3. 依然提示说明steam限制你访问了,休息一下吧 63 | 6. **弹出Not a valid integer value** 64 | 1. 打开右边设置,每页显示数量中填入1~80之间的整数(正常是20)。 65 | 7. **一直提示bad request** 66 | 1. 不要选RMB当货币,应该选择CNY。 67 | (根据国际标准化组织的ISO 4217标准,人民币的货币代码为CNY) 68 | 8. **插件一直在转圈** 69 | 1. 同上 70 | 2. 升级浏览器 71 | 9. **提示我无法连接steam/连接steam超时** 72 | 3. 挂加速器、梯子,确保使用插件的浏览器可以正常访问[steam市场][steamMarket]之后刷新页面或者点开设置页面检测连接性 73 | 4. 弹出访问授权窗口时请确认域名后选择允许(永久拒绝了就重装) 74 | 5. 打开设置检测连接性,成功连接的话会给出你的连接时间,如果已经接近20秒(20000ms)的话你应该考虑更换网络环境 75 | 10. **我以前\*\*\*用的好好的,更新后就不行了** 76 | 6. 设置里找 77 | 11. **我设置不会用** 78 | 7. 鼠标放到旁边的问号看说明 79 | 80 |

    大招:更新到最新版本

    81 |

    大招2:打开设置页面点恢复默认设置

    82 | 83 | ### 还有问题可以开[反馈贴][postFeedback]或者发邮件[funkyturkey@yeah.net][emailMe]反馈 84 | 85 | --- 86 | 87 | ### 插件代码托管在[![GitHub](https://img.shields.io/github/forks/Proanx/buffMarketHelper?style=social)][githubPage]。也有副本在[![Gitee](https://gitee.com/pronax/buffMarketHelper/badge/fork.svg?theme=dark)][giteePage],不过是**手动同步,可能会慢几个commit**,开发者们可以直接发pr。 88 | ### 不管你是普通人还是开发者,只要建议被采纳都会加进顶部的感谢名单! ヽ( ̄ω ̄( ̄ω ̄〃)ゝ) 快来一起开发插件吧 89 | 90 | ### 如果你喜欢这个插件或者喜欢我本人,可以扫这里打赏↓ 91 | 92 | 93 | 94 | [contributors-bitaminkim]:https://keylol.com/forum.php?mod=viewthread&tid=731319 95 | [contributors-gearApp]:https://gear4.app/ 96 | 97 | [steamMarket]:https://steamcommunity.com/market/ 98 | [postFeedback]:https://greasyfork.org/zh-CN/scripts/410137/feedback#post-discussion 99 | [emailMe]:mailto:funkyturkey@yeah.net?subject=%E8%BF%99%E9%87%8C%E6%9C%89%E4%B8%80%E4%B8%AAbug%E5%8F%8D%E9%A6%88/%E4%BF%AE%E6%94%B9%E5%BB%BA%E8%AE%AE 100 | [giteePage]:https://gitee.com/pronax/buffMarketHelper 101 | [giteeCommits]:https://gitee.com/pronax/buffMarketHelper/commits/master 102 | [githubPage]:https://github.com/Proanx/buffMarketHelper 103 | [githubCommits]:https://github.com/Proanx/buffMarketHelper/commits/master 104 | [qqGroup1]:https://jq.qq.com/?_wv=1027&k=U8mqorxQ 105 | [qqGroup2]:https://jq.qq.com/?_wv=1027&k=98pr2kNH 106 | [qqGroup3]:https://jq.qq.com/?_wv=1027&k=F0sj0vKs 107 | 108 | [photo1]:https://s1.ax1x.com/2022/03/25/qt3Kun.png 109 | [photo2]:https://s1.ax1x.com/2022/03/25/qt3QH0.png 110 | [photo3]:https://s1.ax1x.com/2022/03/25/qt3njs.png 111 | [iconograph1-1]:https://s1.ax1x.com/2022/03/25/qt3cgH.png 112 | [iconograph1-2]:https://s1.ax1x.com/2022/03/25/qt368e.png 113 | [iconograph1-3]:https://s1.ax1x.com/2022/03/25/qt3yCD.png 114 | [iconograph2-1]:https://s1.ax1x.com/2022/03/25/qt3gvd.png 115 | [iconograph2-2]:https://s1.ax1x.com/2022/03/25/qt3r4O.png 116 | [iconograph2-3]:https://s1.ax1x.com/2022/03/25/qt3RKA.gif 117 | [iconograph2-4]:https://s1.ax1x.com/2022/03/25/qt3fbt.gif 118 | [iconograph2-5]:https://s1.ax1x.com/2022/03/25/qt3WDI.png 119 | [iconograph2-6]:https://s1.ax1x.com/2022/03/25/qt34VP.png 120 | [tipcode]:https://markethelper.buff.pronax.tech/tipcode_large.png --------------------------------------------------------------------------------