├── .gitignore ├── LICENSE ├── README.md ├── css ├── coursefuck.css ├── homeworkfuck.css ├── options.css ├── videoalone.css └── zhsvideofuck.css ├── downloadbook.html ├── downloadsub.html ├── ico ├── 128.png ├── 16.png ├── 32.png └── 48.png ├── js(origin) ├── background.js ├── bookfuck.js ├── bookimg.js ├── coursefuck.js ├── downloadbook.js ├── downloadsub.js ├── homeworkfuck.js ├── license.js ├── notice.js ├── options.js ├── settings.js ├── videoalone.js ├── videofuck.js ├── zhfuckembedppt.js └── zhsvideofuck.js ├── license.html ├── manifest.json ├── options.html └── ownh5help.html /.gitignore: -------------------------------------------------------------------------------- 1 | js/ 2 | jso/ 3 | package-lock.json 4 | node_modules/ 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 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 General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 超星学习通谷歌浏览器扩展 2 | ## 功能 3 | 视频倍速播放,强制继续播放 4 | 现在已经支持智慧树啦 5 | 具体功能现在很多,可以进[Releases](https://github.com/lifegpc/fuckchaoxing/releases)里看。 6 | 已上架谷歌chrome网上应用店,[链接](https://chrome.google.com/webstore/detail/kejppjboemkbampcomibgpenbmdpimol) 7 | ## 第三方库 8 | [jQuery](https://jquery.com/) 9 | [FileSaver](https://github.com/eligrey/FileSaver.js/) 10 | [JSZip](https://github.com/Stuk/jszip) 11 | [JavaScript-MD5](https://github.com/blueimp/JavaScript-MD5) 12 | ## 其他 13 | 本项目的所有JS文件都在js(origin)文件夹中,采用谷歌的[工具](https://developers.google.com/closure/compiler/docs/gettingstarted_api)进行缩减并输出到js文件夹 14 | -------------------------------------------------------------------------------- /css/coursefuck.css: -------------------------------------------------------------------------------- 1 | .cf{position:fixed;background-color:#FFFFFFB3;width:fit-content;height:fit-content;max-width:200px;max-height:300px;overflow:auto;font-size:12px;color:red;} 2 | .id{display:inline-block;} 3 | input.id{height:auto;line-height:normal;} 4 | -------------------------------------------------------------------------------- /css/homeworkfuck.css: -------------------------------------------------------------------------------- 1 | .id{display:inline-block;}.id2{font-size:12px;color:red;} 2 | -------------------------------------------------------------------------------- /css/options.css: -------------------------------------------------------------------------------- 1 | td.a{width: 80%;} 2 | td.b{width: 20%;text-align: right;} 3 | button.a{margin-right: 4px;} 4 | td.a div{font-size: 12px;color:#5F6368;} 5 | td{border-bottom:1px dashed red;} 6 | -------------------------------------------------------------------------------- /css/videoalone.css: -------------------------------------------------------------------------------- 1 | .vf{position:fixed;background-color:#FFFFFFB3;width:fit-content;height:fit-content;max-width:200px;max-height:300px;overflow:auto;font-size:12px;color:red;z-index:1;} 2 | .id{display:inline-block;} 3 | -------------------------------------------------------------------------------- /css/zhsvideofuck.css: -------------------------------------------------------------------------------- 1 | .vf{position:fixed;background-color:#FFFFFFB3;width:fit-content;height:fit-content;max-width:200px;max-height:300px;overflow:auto;font-size:12px;color:red;z-index:1000000;} 2 | .id{display:inline-block;} 3 | -------------------------------------------------------------------------------- /downloadbook.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 超星学习通辅助插件-图书保存页 4 | 5 | 6 | 7 | 8 | 9 |

图书保存页

10 | 11 | 12 | -------------------------------------------------------------------------------- /downloadsub.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 超星学习通辅助插件-字幕保存页 4 | 5 | 6 | 7 | 8 | 9 | 10 |

字幕保存页

11 | 12 | 13 | -------------------------------------------------------------------------------- /ico/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifegpc/fuckchaoxing/f9ce7a3949e1754f5f38b578a5a099bbf7d8b738/ico/128.png -------------------------------------------------------------------------------- /ico/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifegpc/fuckchaoxing/f9ce7a3949e1754f5f38b578a5a099bbf7d8b738/ico/16.png -------------------------------------------------------------------------------- /ico/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifegpc/fuckchaoxing/f9ce7a3949e1754f5f38b578a5a099bbf7d8b738/ico/32.png -------------------------------------------------------------------------------- /ico/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifegpc/fuckchaoxing/f9ce7a3949e1754f5f38b578a5a099bbf7d8b738/ico/48.png -------------------------------------------------------------------------------- /js(origin)/background.js: -------------------------------------------------------------------------------- 1 | console.log('background.js'); 2 | (function(){ 3 | /**@type {boolean} bookimg页面是否存在*/ 4 | var fra=false; 5 | /**@type {number} bookimg页面ID*/ 6 | var fid=null; 7 | /**@type {number} 分配的ID*/ 8 | var fid2=0; 9 | chrome.runtime.onMessage.addListener(function(message,sender,sendResponse) 10 | { 11 | /**获取url文件名 12 | * @param {string} url 13 | */ 14 | function getname(url) 15 | { 16 | var temp=url.split('/'); 17 | return temp[temp.length-1]; 18 | } 19 | if(message.action=="openuri") 20 | { 21 | chrome.tabs.create({url:message.uri,active:true}); 22 | sendResponse(1); 23 | return; 24 | } 25 | if(message.action=="getzm") 26 | { 27 | $.get(message.url,function(data,success) 28 | { 29 | chrome.tabs.create({url:"downloadsub.html",active:true},function(tab) 30 | { 31 | function getnew(tid) 32 | { 33 | chrome.tabs.get(tid,function(tab) 34 | { 35 | if(tab.status=="loading") 36 | { 37 | setTimeout(function(){getnew(tid);},1000); 38 | } 39 | else then(); 40 | }); 41 | } 42 | (function(tid){setTimeout(function(){getnew(tid)},1000);})(tab.id); 43 | function then() 44 | { 45 | chrome.runtime.sendMessage({action:"savesub",b:data,name:getname(message.url)},function(data){console.log(data)}); 46 | } 47 | }) 48 | }); 49 | sendResponse(1); 50 | } 51 | if(message.action=="bookfuckc") 52 | { 53 | message.action="bookfuckc2"; 54 | (function(message,sender){setTimeout(function(){ 55 | chrome.tabs.sendMessage(sender.tab.id,message,function(data) 56 | { 57 | chrome.tabs.sendMessage(sender.tab.id,{action:"bookfuckc3",r:data}); 58 | }); 59 | },3000)})(message,sender); 60 | sendResponse(1); 61 | } 62 | /**@param {string} newaction 63 | * @param {string} backaction 64 | */ 65 | function resend(message,newaction,backaction,sender) 66 | { 67 | message.action=newaction; 68 | (function(sender){chrome.tabs.sendMessage(sender.tab.id,message,function(data) 69 | { 70 | chrome.tabs.sendMessage(sender.tab.id,{action:backaction,r:data}); 71 | })})(sender); 72 | sendResponse(1); 73 | } 74 | /**@param {string} newaction*/ 75 | function resend2(message,newaction) 76 | { 77 | message.action=newaction; 78 | chrome.tabs.sendMessage(sender.tab.id,message); 79 | sendResponse(1); 80 | } 81 | if(message.action=="downloadbook") 82 | { 83 | message.fra=fra; 84 | message.fid=fid2; 85 | fid2++; 86 | resend(message,"downloadbook2","downloadbook3",sender); 87 | } 88 | if(message.action=="downloadbooks") 89 | { 90 | resend(message,"downloadbooks2","downloadbooks3",sender); 91 | } 92 | if(message.action=="bookautoscroll") 93 | { 94 | resend(message,"bookautoscroll2","bookautoscroll3",sender); 95 | } 96 | if(message.action=="bookautoscrolls") 97 | { 98 | resend(message,"bookautoscrolls2","bookautoscrolls3",sender); 99 | } 100 | if(message.action=="bookautoscrollc") 101 | { 102 | resend2(message,"bookautoscrollc2"); 103 | } 104 | if(message.action=="downloadbookc") 105 | { 106 | resend2(message,"downloadbookc2"); 107 | } 108 | if(message.action=="downloadbooki") 109 | { 110 | resend2(message,"downloadbooki2"); 111 | } 112 | if(message.action=="createf") 113 | { 114 | sendResponse(1); 115 | (function(a,b){getframe(a,b);})(message.u,sender.tab.id); 116 | } 117 | if(message.action=="getimg") 118 | { 119 | message.action="getimg2"; 120 | message.tid=sender.tab.id; 121 | chrome.tabs.sendMessage(fid,message); 122 | sendResponse(1); 123 | } 124 | if(message.action=="returnimg") 125 | { 126 | message.action="returnimg2"; 127 | chrome.tabs.sendMessage(message.tid,message); 128 | sendResponse(1); 129 | } 130 | if(message.action=="savebook") 131 | { 132 | chrome.tabs.create({url:"downloadbook.html",active:true},function(tab) 133 | { 134 | function getnew(tid) 135 | { 136 | chrome.tabs.get(tid,function(tab) 137 | { 138 | if(tab.status=="loading") 139 | { 140 | setTimeout(function(){getnew(tid);},1000); 141 | } 142 | else then(); 143 | }); 144 | } 145 | (function(tid){setTimeout(function(){getnew(tid)},1000);})(tab.id); 146 | function then() 147 | { 148 | message.action="savebook2" 149 | chrome.runtime.sendMessage(message); 150 | } 151 | }); 152 | } 153 | }); 154 | function getframe(url,ttid) 155 | { 156 | fra=true; 157 | chrome.tabs.create({'url':url,active:false},function(tab) 158 | { 159 | fid=tab.id; 160 | function getnew(tid) 161 | { 162 | chrome.tabs.get(tid,function(tab) 163 | { 164 | if(tab.status=="loading") 165 | { 166 | setTimeout(function(){getnew(tid);},1000); 167 | } 168 | else then(); 169 | }); 170 | } 171 | (function(tid){setTimeout(function(){getnew(tid)},1000);})(tab.id); 172 | function then() 173 | { 174 | chrome.tabs.onRemoved.addListener(function(tabId,removeInfo) 175 | { 176 | if(tabId==fid) 177 | { 178 | fra=false; 179 | fid=null; 180 | console.log("img tab closed."); 181 | console.log(removeInfo); 182 | } 183 | }) 184 | chrome.tabs.sendMessage(ttid,{action:"createf2"}); 185 | } 186 | }) 187 | } 188 | })(); 189 | -------------------------------------------------------------------------------- /js(origin)/bookfuck.js: -------------------------------------------------------------------------------- 1 | console.log('bookfuck.js'); 2 | (function(){ 3 | var bookinfo={}; 4 | var bookinfo2=null; 5 | /**@type {number} 滚动时计时器id*/ 6 | var scrollid=null; 7 | /**@type {HTMLDivElement}*/ 8 | var Readweb=null; 9 | /**@type {HTMLSelectElement}*/ 10 | var pagejump=null; 11 | /**章节*/ 12 | var chapterlist={}; 13 | /**章节列表*/ 14 | var clist=[]; 15 | /**@type {number} 文件下载计时器id*/ 16 | var downloadid=null; 17 | /**@type {number} 文件下载信息计时器id*/ 18 | var downloadiid=null; 19 | /**@typedef {{l:number;n:number;e:"zip";i:number;j:number}} di 20 | * @type {di} 下载文件信息*/ 21 | var downloadinfo={}; 22 | /**@type {JSZip} */ 23 | var zip=null; 24 | /**@type {boolean} 背景页img标签页是否存在*/ 25 | var fra=null; 26 | /**@type {number} 向img标签页发送时ID*/ 27 | var fid=null; 28 | function fuckbook() 29 | { 30 | function getbookinfo() 31 | { 32 | var b=document.getElementById('bookinfo'); 33 | if(b!=null){ 34 | var temp=b.innerText; 35 | var t2=temp.split(","); 36 | bookinfo.a=t2[0]; 37 | bookinfo.bn=t2[1]; 38 | bookinfo.p=t2[2]; 39 | bookinfo.pd=t2[3]; 40 | then(); 41 | } else setTimeout(getbookinfo,1000); 42 | } 43 | getbookinfo(); 44 | function then(){ 45 | Readweb=document.getElementById('Readweb'); 46 | pagejump=document.getElementById('pagejump'); 47 | console.log(bookinfo); 48 | console.log(Readweb); 49 | console.log(pagejump); 50 | /**比较数据信息是否相等*/ 51 | function comparebookinfo(bi1,bi2) 52 | { 53 | return bi1.a==bi2.a&&bi1.bn==bi2.bn; 54 | } 55 | /**自动滚动 56 | * @param {number} lastY 上一次滚动后的scrollTop 57 | * @param {number} s 每一次滚动的像素 正的向下 负的向上 58 | * @param {number} j 间隔时间(ms) 59 | */ 60 | function scroll(lastY,s,j) 61 | { 62 | Readweb.scrollTo(Readweb.scrollLeft,lastY+s); 63 | if(lastY==Readweb.scrollTop) 64 | { 65 | chrome.runtime.sendMessage({action:"bookautoscrollc",bi:bookinfo})//发送通知已自动停止 66 | } 67 | else 68 | { 69 | (function(lastY){scrollid=setTimeout(function(){scroll(lastY,s,j)},j)})(Readweb.scrollTop); 70 | } 71 | } 72 | function getchapterlist() 73 | { 74 | var list={}; 75 | for(var i=0;i0&&e.target.result.split(',')[1]!=undefined&&e.target.result.split(',')[1].length>0) 28 | chrome.runtime.sendMessage({action:"returnimg",'id':id,'tid':tid,'d':e.target.result.split(',',2)[1],'i':info}); 29 | else 30 | { 31 | (function(url,id,tid,info){setTimeout(function(){downloadimg(url,id,tid,info)},1000)})(url,id,tid,info); 32 | } 33 | } 34 | } 35 | else 36 | { 37 | (function(url,id,tid,info){setTimeout(function(){downloadimg(url,id,tid,info)},1000)})(url,id,tid,info); 38 | } 39 | } 40 | xhr.send(); 41 | } 42 | fuckbookimg(); 43 | })(); 44 | -------------------------------------------------------------------------------- /js(origin)/coursefuck.js: -------------------------------------------------------------------------------- 1 | console.log('coursefuck.js'); 2 | (function(){ 3 | var db=document.body; 4 | function fuckcourse() 5 | { 6 | var div=document.createElement('div'); 7 | div.className="cf"; 8 | div.style.left=db.clientWidth-210+"px"; 9 | div.style.top=db.clientHeight-310+"px"; 10 | var div2=document.createElement('div'); 11 | div2.innerText="显示专题控制面板"; 12 | div2.setAttribute('i',0); 13 | div.append(div2); 14 | div.draggable="true"; 15 | div.addEventListener('dragenter',function(e){e.preventDefault();}) 16 | div.addEventListener('dragover',function(e){e.preventDefault();}) 17 | /**@typedef {{x:number;y:number;}} pos 18 | * @type {pos} div被拖动时鼠标相对元素偏移的位置*/ 19 | var divp={x:0,y:0}; 20 | div.addEventListener('dragstart',function(e) 21 | { 22 | divp.x=div.offsetLeft-e.x; 23 | divp.y=div.offsetTop-e.y; 24 | }) 25 | div.addEventListener('dragend',function(e){ 26 | div.style.left=e.x+divp.x+"px"; 27 | div.style.top=e.y+divp.y+"px"; 28 | }) 29 | db.append(div); 30 | var div3=document.createElement('div'); 31 | div3.style.display="none"; 32 | div.append(div3); 33 | function showhidecontrols() 34 | { 35 | var i=div2.getAttribute('i')-1+1; 36 | if(i) 37 | { 38 | div2.innerText="显示专题控制面板"; 39 | div3.style.display="none"; 40 | div2.setAttribute('i',0); 41 | } 42 | else 43 | { 44 | div2.innerText="隐藏专题控制面板"; 45 | div3.style.display=null; 46 | div2.setAttribute('i',1); 47 | } 48 | } 49 | div2.addEventListener('click',showhidecontrols); 50 | /**@type {number} 总章节数*/ 51 | var chapterlength=document.getElementsByClassName('mb15 course_section fix').length; 52 | /**@type {number} 现在已加载数*/ 53 | var nowload=1; 54 | /**@type {HTMLLinkElement} 加载按钮*/ 55 | var clicka=null; 56 | /**@type {number} 加载按钮的滚动高度位置*/ 57 | var clickal=null; 58 | /**@type {boolean} 是否加载全部*/ 59 | var loadall=false; 60 | function getclick() 61 | { 62 | var temp=document.getElementById('loadbutton'); 63 | if(temp==null) 64 | { 65 | setTimeout(getclick,100); 66 | return; 67 | } 68 | clicka=temp; 69 | clickal=clicka.offsetTop; 70 | function load() 71 | { 72 | nowload++; 73 | function load2() 74 | { 75 | if(nowload!=chapterlength) 76 | { 77 | var temp=document.getElementById('loadbutton'); 78 | if(temp!=null) 79 | { 80 | clicka=temp; 81 | clicka.addEventListener('click',load); 82 | clickal=clicka.offsetTop; 83 | if(loadall) 84 | { 85 | loadallo.innerText=nowload+"/"+chapterlength; 86 | clicka.click(); 87 | } 88 | } 89 | else setTimeout(load2,100); 90 | } 91 | else if(loadall) 92 | { 93 | loadallo.innerText="全部内容已加载完毕"; 94 | } 95 | } 96 | console.log(nowload); 97 | setTimeout(load2,100); 98 | clicka=null; 99 | clickal=null; 100 | } 101 | clicka.addEventListener('click',load); 102 | } 103 | getclick(); 104 | console.log(chapterlength); 105 | var scrolld=document.createElement('div'); 106 | div3.append(scrolld); 107 | var scrolll1=document.createElement('div'); 108 | scrolll1.innerText="自动滚动方向:"; 109 | scrolll1.className="id"; 110 | scrolld.append(scrolll1); 111 | var scrolls=document.createElement('select'); 112 | scrolls.className="id"; 113 | var scrollo1=document.createElement('option'); 114 | scrollo1.innerText="向下"; 115 | scrollo1.value="down"; 116 | scrolls.append(scrollo1); 117 | var scrollo2=document.createElement('option'); 118 | scrollo2.innerText="向上"; 119 | scrollo2.value="up"; 120 | scrolls.append(scrollo2); 121 | scrolls.value=scrollo1.value; 122 | scrolld.append(scrolls); 123 | scrolld.append(document.createElement('br')); 124 | var scrolll2=document.createElement('div'); 125 | scrolll2.className="id"; 126 | scrolll2.innerText="自动滚动速度:"; 127 | scrolld.append(scrolll2); 128 | var scrolli=document.createElement('input'); 129 | scrolli.value=100; 130 | scrolli.style.width="50px"; 131 | scrolli.className="id"; 132 | scrolld.append(scrolli); 133 | var scrolll3=document.createElement('div'); 134 | scrolll3.innerText="像素/s"; 135 | scrolll3.className="id"; 136 | scrolld.append(scrolll3); 137 | scrolld.append(document.createElement('br')); 138 | var scrolll4=document.createElement('div'); 139 | scrolll4.className="id"; 140 | scrolll4.innerText="每秒滚动次数:"; 141 | scrolld.append(scrolll4); 142 | var scrolli2=document.createElement('input'); 143 | scrolli2.value=1; 144 | scrolli2.style.width="50px"; 145 | scrolli2.className="id"; 146 | scrolld.append(scrolli2); 147 | scrolld.append(document.createElement('br')); 148 | var scrolli3=document.createElement('input'); 149 | scrolli3.type="checkbox"; 150 | scrolli3.className="id"; 151 | if(settings!=null&&settings.coal)scrolli3.checked=true;else scrolli3.checked=false; 152 | scrolld.append(scrolli3); 153 | var scrolll5=document.createElement('div'); 154 | scrolll5.innerText="滚动时自动加载内容"; 155 | scrolll5.className="id"; 156 | scrolld.append(scrolll5); 157 | var scrollbr=document.createElement('br') 158 | scrolld.append(scrollbr); 159 | var scrollb=document.createElement('button'); 160 | scrollb.innerText="自动滚动"; 161 | scrollb.setAttribute('i',0); 162 | scrolld.append(scrollb); 163 | var scrollo=document.createElement('div'); 164 | scrolld.append(scrollo); 165 | var loadalld=document.createElement('div'); 166 | var loadallb=document.createElement('button'); 167 | loadallb.innerText="加载所有内容"; 168 | function loadallba() 169 | { 170 | loadallb.style.display="none"; 171 | loadallb.disabled=true; 172 | scrolli3.disabled=true; 173 | scrolli3.checked=false; 174 | scrolli3.style.display="none"; 175 | scrolll5.style.display="none"; 176 | scrollbr.remove(); 177 | loadall=true; 178 | function startload() 179 | { 180 | if(clicka!=null)clicka.click(); 181 | else setTimeout(startload,1000); 182 | } 183 | startload(); 184 | } 185 | loadallb.addEventListener('click',loadallba); 186 | var loadallo=document.createElement('div'); 187 | loadallo.className="id"; 188 | loadalld.append(loadallb); 189 | loadalld.append(loadallo); 190 | div3.append(loadalld); 191 | /**@type {number} 计时器ID*/ 192 | var jid=null; 193 | /**@param {number} lastY 上一次滚动的位置 194 | * @param {number} s 每次滚动的距离 正向下 负向上 195 | * @param {number} j 计时器间隔 196 | * @param {boolean} l 是否自动加载 197 | */ 198 | function scroll(lastY,s,j,l) 199 | { 200 | window.scrollTo(window.scrollX,lastY+s) 201 | if(((!l)||(l&&chapterlength==nowload))&&lastY==window.scrollY) 202 | { 203 | jid=null; 204 | scrollb.setAttribute('i',0); 205 | scrollb.innerText="自动滚动"; 206 | scrollo.innerText="已自动停止滚动"; 207 | } 208 | else 209 | { 210 | (function(lastY){jid=setTimeout(function(){scroll(lastY,s,j,l)},j)})(window.scrollY); 211 | if(lastY>(clickal-db.clientHeight-200)&&l&&chapterlength!=nowload&&clicka!=null)clicka.click(); 212 | } 213 | } 214 | function scrollba() 215 | { 216 | var i=scrollb.getAttribute('i')-1+1; 217 | if(i) 218 | { 219 | if(jid!=null) 220 | { 221 | clearTimeout(jid); 222 | jid=null; 223 | } 224 | scrollb.setAttribute('i',0); 225 | scrollb.innerText="自动滚动"; 226 | scrollo.innerText="已停止滚动"; 227 | } 228 | else 229 | { 230 | var speed=scrolli.value-1+1; 231 | if(isNaN(speed)){scrollo.innerText="自动滚动速度不是数字";return;} 232 | if(speed<1){scrollo.innerText="自动滚动速度应大于等于1";return;} 233 | var speed2=Math.round(scrolli2.value-1+1); 234 | if(isNaN(speed2)){scrollo.innerText="每秒钟滚动次数不是数字";return;} 235 | if(speed2<1||speed2>100){scrollo.innerText="每秒钟滚动次数应是1-100间的整数";return;} 236 | if(speed2>speed){scrollo.innerText="每秒钟滚动次数大于自动滚动速度会导致无法滚动";return;} 237 | scrollb.setAttribute('i',1); 238 | scrollb.innerText="停止自动滚动"; 239 | var s=speed/speed2; 240 | if(scrolls.value=="up")s*=-1; 241 | scroll(window.scrollY,s,1000/speed2,scrolli3.checked); 242 | scrollo.innerText="已开始自动滚动"; 243 | } 244 | } 245 | scrollb.addEventListener('click',scrollba); 246 | if(settings!=null&&settings.showco)showhidecontrols(); 247 | if(settings!=null&&settings.cola)loadallba(); 248 | } 249 | /**@type {Array} chrome插件设置*/ 250 | var settings=null; 251 | try 252 | { 253 | if(chrome==undefined||chrome.storage==undefined)throw new Error('chrome.storage未定义'); 254 | chrome.storage.sync.get(function(data) 255 | { 256 | settings=data; 257 | var r=scheck(settings,function(){ 258 | chrome.storage.sync.get(function(data) 259 | { 260 | settings=data; 261 | console.log(data); 262 | fuckcourse(); 263 | }); 264 | }); 265 | if(!r)fuckcourse(); 266 | }); 267 | } 268 | catch(e) 269 | { 270 | console.log(e); 271 | settings=null; 272 | fuckcourse(); 273 | } 274 | })(); 275 | -------------------------------------------------------------------------------- /js(origin)/downloadbook.js: -------------------------------------------------------------------------------- 1 | console.log('downloadbook.js'); 2 | var f=false; 3 | chrome.runtime.onMessage.addListener(function(message, sender,sendResponse) 4 | { 5 | if(message.action=="savebook2"&&!f) 6 | { 7 | sendResponse(1); 8 | var link = document.createElement("a"); 9 | link.href = message.url; 10 | link.download = message.name; 11 | link.innerText=message.name; 12 | var div=document.createElement('div'); 13 | var div2=document.createElement('div'); 14 | div2.innerText="点击以下链接也可以保存哦"; 15 | div.append(div2); 16 | div.append(link); 17 | document.body.appendChild(div); 18 | } 19 | }); 20 | -------------------------------------------------------------------------------- /js(origin)/downloadsub.js: -------------------------------------------------------------------------------- 1 | console.log('downloadsub.js'); 2 | var b; 3 | chrome.runtime.onMessage.addListener(function(message, sender,sendResponse) 4 | { 5 | if(message.action=="savesub"&&b==undefined) 6 | { 7 | b=new Blob([message.b], {type: 'text/plain'}); 8 | saveAs(b,message.name); 9 | sendResponse(1); 10 | var blobUrl = URL.createObjectURL(b); 11 | var link = document.createElement("a"); 12 | link.href = blobUrl; 13 | link.download = message.name; 14 | link.innerText=message.name; 15 | var div=document.createElement('div'); 16 | var div2=document.createElement('div'); 17 | div2.innerText="点击以下链接也可以保存哦"; 18 | div.append(div2); 19 | div.append(link); 20 | document.body.appendChild(div); 21 | } 22 | }); 23 | -------------------------------------------------------------------------------- /js(origin)/homeworkfuck.js: -------------------------------------------------------------------------------- 1 | console.log('homeworkfuck.js'); 2 | (function(){ 3 | function fuckhomework() 4 | { 5 | function getiframe() 6 | { 7 | var ifrc=document.getElementsByTagName('iframe'); 8 | if(ifrc.length) 9 | { 10 | console.log(ifrc); 11 | for(var i=0;i} 课程列表*/ 14 | var courselist; 15 | /**@type {number} 检测活动列表定时器*/ 16 | var kci=null; 17 | /**@type {Array} 已通知活动列表*/ 18 | var tcl=[]; 19 | var tcq={}; 20 | /**保存内容至localstorage 21 | * @param data 要保存的内容 22 | * @param {string} name 变量名 23 | * @param {()=>void} f 回调函数 24 | */ 25 | function storageset(data,name,f=null) 26 | { 27 | chrome.storage.local.get(function(obj) 28 | { 29 | obj[name]=data; 30 | if(f)chrome.storage.local.set(obj,f); 31 | else chrome.storage.local.set(obj); 32 | }) 33 | } 34 | /**从localstorage获取内容 35 | * @param {string} name 变量名 36 | * @param d 初始化数据(如果不存在时返回这个并设置为这个) 37 | * @param {(data)=>void} f 回调函数 38 | */ 39 | function storageget(name,d,f) 40 | { 41 | chrome.storage.local.get(function(obj) 42 | { 43 | if(obj[name]) 44 | { 45 | f(obj[name]); 46 | } 47 | else 48 | { 49 | obj[name]=d; 50 | chrome.storage.local.set(obj); 51 | f(d); 52 | } 53 | }) 54 | } 55 | chrome.runtime.onMessage.addListener(function(message,sender,sendResponse) 56 | { 57 | if(message.action=="startnotice")//设置启用 58 | { 59 | if(!work)swork(); 60 | sendResponse(1); 61 | return; 62 | } 63 | if(message.action=="stopnotice") 64 | { 65 | if(work) 66 | { 67 | if(kil!=null) 68 | { 69 | clearTimeout(kil); 70 | kil=null; 71 | } 72 | if(kci!=null) 73 | { 74 | clearTimeout(kci); 75 | kci=null; 76 | } 77 | work=false; 78 | } 79 | sendResponse(1); 80 | return; 81 | } 82 | }); 83 | var settings=null; 84 | chrome.storage.sync.get(function(data) 85 | { 86 | if(!scheck(data,function() 87 | { 88 | chrome.storage.sync.get(function(data) 89 | { 90 | settings=data; 91 | if(settings.not)swork(); 92 | }); 93 | })) 94 | { 95 | settings=data; 96 | if(settings.not)swork(); 97 | } 98 | }); 99 | function swork() 100 | { 101 | work=true; 102 | $.get("http://i.mooc.chaoxing.com/space/index?t="+getnow(),function(d,s) 103 | { 104 | var p=new DOMParser(); 105 | var doc=p.parseFromString(d,"text/html"); 106 | var vf=doc.getElementById('frame_content'); 107 | uri=vf.src; 108 | host=uri.match(/([^:]+:\/\/)?[^\/]+/)[0]; 109 | storageget('tcl',[],function(data) 110 | { 111 | tcl=data; 112 | nw(); 113 | }) 114 | }) 115 | } 116 | function nw() 117 | { 118 | if(kci!=null)//如果有活动列表检测定时任务将删除。 119 | { 120 | clearTimeout(kci); 121 | kci=null; 122 | } 123 | $.get(uri,function(d,s) 124 | { 125 | var p=new DOMParser; 126 | var doc=p.parseFromString(d,"text/html"); 127 | /**@type {HTMLInputElement}*/ 128 | var de=doc.getElementById('debug'); 129 | if(de)deb=de.value;else deb=""; 130 | getpagelist(doc,function(l) 131 | { 132 | courselist=l; 133 | dsrw(); 134 | }); 135 | kil=setTimeout(nw,600000);//10分钟 136 | }) 137 | } 138 | /**活动列表定时检测*/ 139 | function dsrw() 140 | { 141 | if(courselist.length) 142 | { 143 | checkhdi(0,function() 144 | { 145 | kci=setTimeout(dsrw,60000)//1分钟 146 | }); 147 | } 148 | } 149 | /**检测活动 150 | * @param {number} i 课程在courselist的索引 151 | * @param {()=>void} f 回调函数(全部完成时回调) 152 | */ 153 | function checkhdi(i,f) 154 | { 155 | if(ivoid} f 回调函数 167 | */ 168 | function checkhd(i,f) 169 | { 170 | $.get("https://mobilelearn.chaoxing.com/widget/pcpick/stu/index",{courseId:i.cid,jclassId:i.jid},function(d,s) 171 | { 172 | var p=new DOMParser(); 173 | var doc=p.parseFromString(d,"text/html"); 174 | parsehd(doc,f); 175 | }) 176 | } 177 | /**解析doc档案 178 | * @param {Document} d 179 | * @param {()=>void} f 回调函数 180 | */ 181 | function parsehd(d,f) 182 | { 183 | var hdlist=[]; 184 | /**@type {HTMLDivElement} 活动列表,startlist为正在进行中*/ 185 | var listdiv; 186 | var courseId; 187 | var classId; 188 | var puid; 189 | var fid; 190 | function getlistdiv() 191 | { 192 | var te=d.getElementById('startList');//正常状态为startList,DEBUG时可修改为endList 193 | if(te!=null) 194 | { 195 | listdiv=te; 196 | getinfo() 197 | } 198 | else setTimeout(getlistdiv,1000); 199 | } 200 | function getinfo() 201 | { 202 | /**@type {HTMLInputElement}*/ 203 | var t=d.getElementById('puid'); 204 | /**@type {HTMLInputElement}*/ 205 | var t2=d.getElementById('courseId'); 206 | /**@type {HTMLInputElement}*/ 207 | var t3=d.getElementById('classId'); 208 | /**@type {HTMLInputElement}*/ 209 | var t4=d.getElementById('fid'); 210 | if(t!=null&&t2!=null&&t3!=null&&t4!=null) 211 | { 212 | puid=t.value; 213 | courseId=t2.value; 214 | classId=t3.value; 215 | fid=t4.value; 216 | gethdlist(); 217 | } 218 | else setTimeout(getinfo,1000); 219 | } 220 | function gethdlist() 221 | { 222 | for(var i=0;ivoid} f 全部完成后的回调函数 248 | */ 249 | function phdi(i,f) 250 | { 251 | if(ivoid} f 回调函数 263 | */ 264 | function phd(i,f) 265 | { 266 | var s=i.getAttribute('onclick'); 267 | var s2=s.match(/\(([0-9]+),([0-9]+),([^\)]+)\)/); 268 | if(s2!=null) 269 | { 270 | var acid=s2[1]-1+1; 271 | if(isintcl(acid))//已通知,跳过解析 272 | { 273 | f(); 274 | return; 275 | } 276 | var apt=s2[2]-1+1; 277 | /**@type {string}*/ 278 | var uri; 279 | /**@type {string}*/ 280 | var title; 281 | /**@type {string}*/ 282 | var detail; 283 | activeDetail(acid,apt,function(url) 284 | { 285 | uri=url; 286 | if(uri=="")//解析失败,跳过解析 287 | { 288 | f(); 289 | return; 290 | } 291 | [title,detail]=gethdinfo(i); 292 | chrome.notifications.create({ 293 | type:"basic", 294 | iconUrl:"ico/128.png", 295 | title:title, 296 | message:detail 297 | },function(iid) 298 | { 299 | tcq[iid]={cid:acid,uri:uri} 300 | tcl.push(acid); 301 | while(tcl.length>1000)tcl.shift(); 302 | storageset(tcl,'tcl'); 303 | }) 304 | f(); 305 | }) 306 | } 307 | else//解析失败,跳过解析 308 | { 309 | f(); 310 | } 311 | } 312 | /**模拟学习通activeDetail 313 | * @param {number} activeId 314 | * @param {number} appType 315 | * @param {(url:string)=>void} f 回调函数 316 | */ 317 | function activeDetail(activeId,appType,f) 318 | { 319 | var url=""; 320 | var host2="https://mobilelearn.chaoxing.com"; 321 | if(appType==11) 322 | { 323 | url=host2+"/widget/pick/pc/startPick?activeId="+activeId+"&classId="+classId+"&fid="+fid+"&courseId="+courseId; 324 | } 325 | if(appType==2) 326 | { 327 | url=host2+"/widget/sign/pcStuSignController/preSign?activeId="+activeId+"&classId="+classId+"&fid="+fid+"&courseId="+courseId; 328 | } 329 | if(appType==4) 330 | { 331 | url=host2+"/widget/pcAnswer/teaAnswer?activeId="+activeId+"&classId="+classId+"&fid="+fid+"&courseId="+courseId; 332 | } 333 | if(appType==14||appType==42) 334 | { 335 | url=host2+"/widget/pcvote/goStudentVotePage?activeId="+activeId+"&classId="+classId+"&fid="+fid+"&courseId="+courseId+"&quessequence=1"; 336 | } 337 | if(appType==43) 338 | { 339 | url=host2+"/page/qvote/stu/answerQvote?activeId="+activeId+"&classId="+classId+"&fid="+fid+"&courseId="+courseId; 340 | } 341 | if(appType==23) 342 | { 343 | url=host2+"/widget/score/pc/queryScore?activeId="+activeId+"&classId="+classId+"&fid="+fid+"&courseId="+courseId; 344 | } 345 | if(appType==35) 346 | { 347 | $.ajax({ 348 | url:host2+"/v2/apis/taskStu/getActiveInfoForMe", 349 | type:"post", 350 | dataType:"json", 351 | async:'false', 352 | data: {"courseId":courseId,"fid":fid,"activeId":activeId}, 353 | success: function(obj) 354 | { 355 | var isNorm = obj.data.isNorm; 356 | var toAnswerPage =obj.data.toAnswerPage; 357 | var notInClass = obj.data.notInClass; 358 | var useNoteEditor = obj.data.useNoteEditor; 359 | if(notInClass==1) 360 | { 361 | f(""); 362 | return; 363 | } 364 | var url=""; 365 | if(isNorm==1){//分组的 366 | if(useNoteEditor==1){ 367 | if(toAnswerPage==1){ 368 | url = 'https://mobilelearn.chaoxing.com/page/renwuNew/stu/taskDetailStuForAnswer_new?activeId='+activeId+'&courseId='+courseId+"&classId="+classId+"&fid="+fid+"&returnType=3"; 369 | }else{ 370 | url='https://mobilelearn.chaoxing.com/page/renwuNew/stu/taskDetailStuAndAnsDetail_new?courseId='+courseId+'&classId='+classId+'&activeId='+activeId+'&fid='+fid+"&returnType=3"; 371 | } 372 | }else{ 373 | if(toAnswerPage==1){ 374 | url = 'https://mobilelearn.chaoxing.com/page/renwu/stu/taskDetailStuForAnswer?activeId='+activeId+'&courseId='+courseId+"&classId="+classId+"&fid="+fid+"&returnType=3"; 375 | }else{ 376 | url='https://mobilelearn.chaoxing.com/page/renwu/stu/taskDetailStuAndAnsDetail?courseId='+courseId+'&classId='+classId+'&activeId='+activeId+'&fid='+fid+"&returnType=3"; 377 | } 378 | } 379 | }else{ 380 | if(useNoteEditor==1){ 381 | if(toAnswerPage==1){ 382 | url='https://mobilelearn.chaoxing.com/page/renwuNew/notGroup/taskDetailStuForAnswerNotGroup_new?courseId='+courseId+'&classId='+classId+'&activeId='+activeId+'&fid='+fid+"&returnType=3" 383 | }else{ 384 | url='https://mobilelearn.chaoxing.com/page/renwuNew/notGroup/taskDetailStuAndAnsDetailNotGroup_new?courseId='+courseId+'&classId='+classId+'&activeId='+activeId+'&fid='+fid+"&returnType=3" 385 | } 386 | }else{ 387 | if(toAnswerPage==1){ 388 | url='https://mobilelearn.chaoxing.com/page/renwu/notGroup/taskDetailStuForAnswerNotGroup?courseId='+courseId+'&classId='+classId+'&activeId='+activeId+'&fid='+fid+"&returnType=3" 389 | }else{ 390 | url='https://mobilelearn.chaoxing.com/page/renwu/notGroup/taskDetailStuAndAnsDetailNotGroup?courseId='+courseId+'&classId='+classId+'&activeId='+activeId+'&fid='+fid+"&returnType=3" 391 | } 392 | } 393 | } 394 | f(url); 395 | }, 396 | error:function() 397 | { 398 | f(""); 399 | } 400 | }); 401 | } 402 | else if(appType==5) 403 | { 404 | $.ajax({ 405 | url:host2+"/v2/apis/discuss/getTopicDiscussInfo", 406 | dataType:"json", 407 | async:'false', 408 | data: {"activeId":activeId}, 409 | success:function(data){ 410 | if (data.result == 1) { 411 | url = "https://groupyd.chaoxing.com/pc/course/topicDiscuss/info?uuid=" + data.data.uuid+"&activeId=" + data.data.activeId + "&startTime=" + data.data.startTime + "&timeLong=" + data.data.timeLong+ "&activeStatus=" + data.data.activeStatus + "&courseId=" + courseId; 412 | f(url); 413 | } 414 | else f(""); 415 | }, 416 | error:function() 417 | { 418 | f(""); 419 | } 420 | }); 421 | } 422 | else 423 | { 424 | f(url); 425 | } 426 | } 427 | /**获得活动详细信息 428 | * @param {HTMLDivElement} i 活动div 429 | * @returns {[string,string]} 分别为标题和详细信息 430 | */ 431 | function gethdinfo(i) 432 | { 433 | var title="活动"; 434 | var t=i.children[0]; 435 | if(t) 436 | { 437 | t=t.children[0]; 438 | if(t) 439 | { 440 | t=t.children[1]; 441 | if(t&&t.tagName=="DD") 442 | { 443 | title=t.innerHTML; 444 | } 445 | } 446 | } 447 | var detail="详细信息"; 448 | t=i.children[1]; 449 | if(t) 450 | { 451 | t=t.children[0]; 452 | if(t&&t.tagName=="A") 453 | { 454 | detail=t.innerHTML; 455 | } 456 | } 457 | return [title,detail]; 458 | } 459 | /**是否已经已通知 460 | * @param a 活动id 461 | */ 462 | function isintcl(a) 463 | { 464 | for(var i=0;i)=>void} f 回调函数 479 | */ 480 | function getpagelist(d,f) 481 | { 482 | var li=d.getElementById('zla_title'); 483 | var p=new DOMParser(); 484 | if(li.childElementCount)get(0); 485 | /**@param {number} i*/ 486 | function get(i) 487 | { 488 | var l=li.children[i]; 489 | var k=l.children[0]; 490 | var o=k.getAttribute('onclick'); 491 | var re=o.match(/\(([0-9]+)\)/); 492 | /**@type {Array} 课程列表*/ 493 | var ral=[]; 494 | if(re!=null) 495 | { 496 | var r=re[1]; 497 | $.get(host+"/visit/courses/study?isAjax=true",{fileId:r,debug:deb},function(d,s) 498 | { 499 | var doc=p.parseFromString(d,"text/html"); 500 | /**是否有自定义文件夹*/ 501 | var havefolder=false; 502 | /**@type {HTMLDivElement}*/ 503 | var uldiv; 504 | /**@type {HTMLUListElement}*/ 505 | var ul; 506 | /**@type {Array}*/ 507 | var lilist=[]; 508 | function getuldiv() 509 | { 510 | var te=doc.getElementsByClassName('ulDiv'); 511 | if(te.length) 512 | { 513 | uldiv=te[0]; 514 | getul(); 515 | } 516 | else setTimeout(getuldiv,100); 517 | } 518 | getuldiv(); 519 | function getul() 520 | { 521 | for(var i=0;ivoid} f 回调函数,回调pthen 584 | */ 585 | function getfolder(i,f) 586 | { 587 | $.get(host+"/visit/courses/study?isAjax=true",{fileId:i,debug:deb},function(d,s) 588 | { 589 | var doc2=p.parseFromString(d,"text/html"); 590 | /**@type {HTMLDivElement}*/ 591 | var uldiv2; 592 | /**@type {HTMLUListElement}*/ 593 | var ul2; 594 | /**@type {Array}*/ 595 | var lilist2=[]; 596 | function getuldiv2() 597 | { 598 | var te=doc2.getElementsByClassName('ulDiv'); 599 | if(te.length) 600 | { 601 | uldiv2=te[0]; 602 | getul2(); 603 | } 604 | else setTimeout(getuldiv2,1000); 605 | } 606 | getuldiv2(); 607 | function getul2() 608 | { 609 | for(var i=0;i} 13 | */ 14 | function getv(version) 15 | { 16 | var l=version.split("."); 17 | for(var i=0;i} v1 版本数组 22 | * @param {Array} v2 版本数组 23 | * @param {number} c 第几个 24 | * @returns {-1|0|1} 前面大 1,相等 0,后面大 -1*/ 25 | function comv(v1,v2,c=0) 26 | { 27 | if (v1[c]>v2[c])return 1; 28 | else if(v1[c]} chrome插件版本数组*/ 49 | var nv=getv(mf.version); 50 | /**@type {boolean} 是否需要重新获取设置*/ 51 | var need=false; 52 | /**@type {Object} 新chrome插件配置*/ 53 | var news={}; 54 | /**获取初始清单*/ 55 | function getnews() 56 | { 57 | news.version=mf.version; 58 | news.vpautoplay=false; 59 | news.apautoplay=false; 60 | news.hidedm=false; 61 | news.showvc=false; 62 | news.showac=false; 63 | news.showbk=false; 64 | news.showpdf=false; 65 | news.showppt=false; 66 | news.showta=false; 67 | news.tatxt=false; 68 | news.showco=false; 69 | news.coal=false; 70 | news.cola=false; 71 | news.zhsvpap=false; 72 | news.zhsshowvc=false; 73 | news.zhsctc=false; 74 | news.zhsant=false; 75 | news.sva=true; 76 | news.svc=false; 77 | news.huo=false; 78 | news.fuo=false; 79 | news.not=false; 80 | } 81 | if(o==1) 82 | { 83 | getnews(); 84 | return news; 85 | } 86 | if(settings.version==undefined) 87 | { 88 | need=true; 89 | getnews(); 90 | } 91 | else 92 | { 93 | /**@type {Array} 当前设置版本数组*/ 94 | var sv=getv(settings.version); 95 | var r=comv(nv,sv); 96 | /**@export 当前版本检查*/ 97 | function needcheck() 98 | { 99 | /**设置需要的内容 100 | * @param {string} key 需要设置的设置名字 101 | * @param value 设置内容 102 | */ 103 | function setneed(key,value) 104 | { 105 | if(!need) 106 | { 107 | need=true; 108 | getnews(); 109 | } 110 | news[key]=value; 111 | } 112 | /**检查并设置内容 113 | * @param {string} key 设置名称 114 | * @param {string} name constructor名字 115 | * @param value 初始值 116 | */ 117 | function isn(key,name,value) 118 | { 119 | if(isa(settings[key],name)) 120 | { 121 | setneed(key,value); 122 | if(temp.length) 123 | { 124 | for(var i=0;i -1) { 27 | s = s.replace("\\'", "'"); 28 | } 29 | a.setAttribute('onclick', null); 30 | a.onclick = null; 31 | a.href = s; 32 | a.target = '_blank'; 33 | a.setAttribute('fucked', 1); 34 | } 35 | setTimeout(fuck_embed_ppt, 1000); 36 | } 37 | 38 | fuck_embed_ppt(); 39 | -------------------------------------------------------------------------------- /js(origin)/zhsvideofuck.js: -------------------------------------------------------------------------------- 1 | console.log("zhsvideofuck.js"); 2 | (function(){ 3 | /**@type {HTMLBodyElement}*/ 4 | var db=document.body; 5 | /**@type {number} div位置left*/ 6 | var dx=db.clientWidth-210; 7 | /**@type {number} div位置top*/ 8 | var dy=db.clientHeight-310; 9 | /**@type {boolean} 视频暂停后自动继续播放视频*/ 10 | var ap=null; 11 | /**@type {boolean} 控制面板是否展开*/ 12 | var d2o=null; 13 | /**@type {HTMLDivElement}*/ 14 | var div=null; 15 | /**@type {number} 播放速度*/ 16 | var pr=null; 17 | /**@type {number} 锁定播放速度*/ 18 | var lpr=null; 19 | /**@type {boolean} 去弹窗*/ 20 | var rt=null; 21 | /**@type {number} 去弹窗计时器ID*/ 22 | var rtn=null; 23 | /**@type {boolean} 进度100%时自动播放下一个*/ 24 | var an=null; 25 | /**@type {number} 进度100%检测计时器*/ 26 | var ann=null; 27 | function fuckvideo() 28 | { 29 | /**@type {HTMLVideoElement} 视频元素*/ 30 | var v=null; 31 | /**@type {HTMLDivElement} 下一个视频*/ 32 | var nb=null; 33 | function getv() 34 | { 35 | var v2=document.getElementsByTagName('video'); 36 | if(v2.length) 37 | { 38 | v=v2[0]; 39 | console.log(v); 40 | setTimeout(getchange,1000); 41 | getnb(); 42 | } 43 | else setTimeout(getv,1000); 44 | } 45 | function getnb() 46 | { 47 | var nb2=document.getElementById('nextBtn'); 48 | if(nb2!=null) 49 | { 50 | nb=nb2; 51 | console.log(nb); 52 | fuck(); 53 | } 54 | else setTimeout(getnb,1000); 55 | } 56 | /**检测视频元素是否变化*/ 57 | function getchange() 58 | { 59 | var v2=document.getElementsByTagName('video'); 60 | if(v2.length==0||v2[0]!=v) 61 | { 62 | div.remove(); 63 | if(rtn!=null) 64 | { 65 | clearTimeout(rtn); 66 | rtn=null; 67 | } 68 | if(ann!=null) 69 | { 70 | clearTimeout(rtn); 71 | rtn=null; 72 | } 73 | fuckvideo(); 74 | } 75 | else setTimeout(getchange,1000); 76 | } 77 | function fuck() 78 | { 79 | if(v.hasAttribute('fucked'))return; 80 | v.setAttribute('fucked',1); 81 | if(d2o==null) 82 | { 83 | d2o=false; 84 | if(settings!=null&&settings.zhsshowvc)d2o=true; 85 | } 86 | div=document.createElement('div'); 87 | div.className="vf"; 88 | div.style.left=dx+"px"; 89 | div.style.top=dy+"px"; 90 | db.append(div); 91 | div.draggable="true"; 92 | div.addEventListener('dragenter',function(e){e.preventDefault();}) 93 | div.addEventListener('dragover',function(e){e.preventDefault();}) 94 | /**@typedef {{x:number;y:number;}} pos 95 | * @type {pos} div被拖动时鼠标相对元素偏移的位置*/ 96 | var divp={x:0,y:0}; 97 | div.addEventListener('dragstart',function(e) 98 | { 99 | divp.x=div.offsetLeft-e.x; 100 | divp.y=div.offsetTop-e.y; 101 | }) 102 | div.addEventListener('dragend',function(e){ 103 | dx=e.x+divp.x; 104 | div.style.left=dx+"px"; 105 | dy=e.y+divp.y; 106 | div.style.top=dy+"px"; 107 | }) 108 | var div2=document.createElement('div'); 109 | div2.innerText="显示视频控制面板"; 110 | div.append(div2); 111 | var div3=document.createElement('div'); 112 | div3.style.display="none"; 113 | div.append(div3); 114 | function showhidecontrols() 115 | { 116 | if(d2o) 117 | { 118 | div2.innerText="显示视频控制面板"; 119 | div3.style.display="none"; 120 | d2o=false; 121 | } 122 | else 123 | { 124 | div2.innerText="隐藏视频控制面板"; 125 | div3.style.display=null; 126 | d2o=true; 127 | } 128 | } 129 | div2.addEventListener('click',showhidecontrols); 130 | if(d2o) 131 | { 132 | d2o=!d2o; 133 | showhidecontrols(); 134 | } 135 | if(ap==null) 136 | { 137 | ap=false; 138 | if(settings!=null&&settings.zhsvpap)ap=true; 139 | } 140 | var autoplayb=document.createElement('button'); 141 | autoplayb.innerText="视频暂停后自动继续播放"; 142 | div3.append(autoplayb); 143 | function autoplay() 144 | { 145 | if(ap) 146 | { 147 | autoplayb.innerText="视频暂停后自动继续播放"; 148 | v.removeEventListener('pause',autoplay2); 149 | ap=false; 150 | } 151 | else 152 | { 153 | autoplayb.innerText="关闭视频暂停后自动继续播放"; 154 | v.addEventListener('pause',autoplay2); 155 | ap=true; 156 | } 157 | } 158 | function autoplay2() 159 | { 160 | if(v.currentTime!=v.duration)v.play(); 161 | } 162 | autoplayb.addEventListener('click',autoplay); 163 | if(ap) 164 | { 165 | ap=!ap; 166 | autoplay(); 167 | } 168 | div3.append(document.createElement('div')); 169 | var speedd=document.createElement('div'); 170 | div3.append(speedd); 171 | var speedl=document.createElement('div'); 172 | speedl.innerText="播放速度调整:"; 173 | speedl.className="id"; 174 | speedd.append(speedl); 175 | if(pr==null) 176 | { 177 | pr=v.playbackRate; 178 | } 179 | if(lpr==null) 180 | { 181 | lpr=false; 182 | } 183 | var speedi=document.createElement('input'); 184 | speedi.className="id"; 185 | speedi.value=pr; 186 | speedi.style.width="40px"; 187 | speedd.append(speedi); 188 | speedd.append(document.createElement('br')); 189 | var speedb=document.createElement('button'); 190 | speedb.innerText="调整播放速度"; 191 | speedd.append(speedb); 192 | var speedb2=document.createElement('button'); 193 | speedb2.innerText="锁定播放速度"; 194 | speedd.append(speedb2); 195 | var speedo=document.createElement('div'); 196 | speedo.className="id"; 197 | speedd.append(speedo); 198 | function changespeed() 199 | { 200 | try 201 | { 202 | var speed=speedi.value-1+1; 203 | v.playbackRate=speed; 204 | pr=speed; 205 | speedo.innerText="速度已调整为"+speed; 206 | } 207 | catch(e) 208 | { 209 | speedo.innerText="发生错误:"+e.message; 210 | } 211 | } 212 | speedb.addEventListener('click',changespeed); 213 | if(pr!=v.playbackRate)changespeed(); 214 | function getratechange() 215 | { 216 | pr=v.playbackRate; 217 | speedi.value=pr; 218 | } 219 | function lockratechange() 220 | { 221 | v.playbackRate=pr; 222 | } 223 | v.addEventListener('ratechange',getratechange); 224 | function lockrate() 225 | { 226 | if(lpr) 227 | { 228 | speedb2.innerText="锁定播放速度"; 229 | v.removeEventListener('ratechange',lockratechange); 230 | v.addEventListener('ratechange',getratechange); 231 | lpr=false; 232 | } 233 | else 234 | { 235 | speedb2.innerText="取消锁定播放速度"; 236 | v.removeEventListener('ratechange',getratechange); 237 | v.addEventListener('ratechange',lockratechange); 238 | lpr=true; 239 | } 240 | } 241 | speedb2.addEventListener('click',lockrate); 242 | if(lpr) 243 | { 244 | lpr=!lpr; 245 | lockrate(); 246 | } 247 | var cleartcb=document.createElement('button'); 248 | cleartcb.innerText="自动拦截问答弹窗"; 249 | div3.append(cleartcb); 250 | if(rt==null) 251 | { 252 | rt=false; 253 | if(settings!=null&&settings.zhsctc)rt=true; 254 | } 255 | function removetc() 256 | { 257 | /**@param {HTMLCollection} bb*/ 258 | function removeall(bb) 259 | { 260 | if(bb.length) 261 | { 262 | for(var i=0;i0&&fl.children[i-1].className=="fl time_icofinish")return true; 312 | } 313 | return false; 314 | } 315 | var anb=document.createElement('button'); 316 | anb.innerText="完成度100%时跳转至下一个视频"; 317 | div3.append(anb); 318 | function checkjd() 319 | { 320 | if(getjd(fl)) 321 | { 322 | ann=null; 323 | nb.click(); 324 | } 325 | else ann=setTimeout(checkjd,1000); 326 | } 327 | function anbf() 328 | { 329 | if(an) 330 | { 331 | anb.innerText="完成度100%时跳转至下一个视频"; 332 | if(ann!=null) 333 | { 334 | clearTimeout(ann); 335 | ann=null; 336 | } 337 | an=false; 338 | } 339 | else 340 | { 341 | anb.innerText="关闭完成度100%时跳转至下一个视频"; 342 | ann=setTimeout(checkjd,1000); 343 | an=true; 344 | } 345 | } 346 | anb.addEventListener('click',anbf); 347 | if(an) 348 | { 349 | an=!an; 350 | anbf(); 351 | } 352 | } 353 | getv(); 354 | } 355 | /**@type {Array} chrome插件设置*/ 356 | var settings=null; 357 | try 358 | { 359 | if(chrome==undefined||chrome.storage==undefined)throw new Error('chrome.storage未定义'); 360 | chrome.storage.sync.get(function(data) 361 | { 362 | settings=data; 363 | var r=scheck(settings,function(){ 364 | chrome.storage.sync.get(function(data) 365 | { 366 | settings=data; 367 | console.log(data); 368 | fuckvideo(); 369 | }); 370 | }); 371 | if(!r)fuckvideo(); 372 | }); 373 | } 374 | catch(e) 375 | { 376 | console.log(e); 377 | settings=null; 378 | fuckvideo(); 379 | } 380 | })(); 381 | -------------------------------------------------------------------------------- /license.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 超星学习通辅助插件-LICENSE 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version":2, 3 | "name":"超星学习通辅助插件", 4 | "version":"1.1.6", 5 | "description":"你懂的(同时支持智慧树),源代码:https://github.com/lifegpc/fuckchaoxing", 6 | "author":"lifegpc", 7 | "permissions":["https://*.chaoxing.com/","http://*.chaoxing.com/","http://*.5read.com/","storage","tabs","https://*.zhihuishu.com/","http://*.zhihuishu.com/","https://*.edu.cn/","http://*.edu.cn/","notifications"], 8 | "background": 9 | { 10 | "scripts":["jso/jquery-3.5.1.min.js","js/settings.js","js/background.js","js/notice.js"] 11 | }, 12 | "content_scripts": 13 | [{ 14 | "matches":["https://*.chaoxing.com/mycourse/studentstudy*","http://*.chaoxing.com/mycourse/studentstudy*","https://*.edu.cn/mycourse/studentstudy*","http://*.edu.cn/mycourse/studentstudy*"], 15 | "js":["jso/md5.min.js","jso/jquery-3.5.1.min.js","js/settings.js","js/videofuck.js"] 16 | }, 17 | { 18 | "matches":["https://readsvr-dx.chaoxing.com/n/readsvr/book/mooc/*","http://readsvr-dx.chaoxing.com/n/readsvr/book/mooc/*","https://resapi.chaoxing.com/innerurlNew?showshidu=false&gcebook=*","http://resapi.chaoxing.com/innerurlNew?showshidu=false&gcebook=*"], 19 | "js":["jso/jszip.min.js","jso/FileSaver.min.js","js/bookfuck.js"], 20 | "all_frames":true 21 | }, 22 | { 23 | "matches":["http://*.5read.com/image/ss2jpg.dll*"], 24 | "js":["js/bookimg.js"] 25 | }, 26 | { 27 | "matches":["https://*.chaoxing.com/course/*","http://*.chaoxing.com/course/*","https://*.edu.cn/course/*","http://*.edu.cn/course/*"], 28 | "js":["js/settings.js","js/coursefuck.js"], 29 | "css":["css/coursefuck.css"] 30 | }, 31 | { 32 | "matches":["https://*.chaoxing.com/work/doHomeWorkNew*","http://*.chaoxing.com/work/doHomeWorkNew*","https://*.edu.cn/work/doHomeWorkNew*","http://*.edu.cn/work/doHomeWorkNew*"], 33 | "js":["js/settings.js","js/homeworkfuck.js"], 34 | "css":["css/homeworkfuck.css"] 35 | }, 36 | { 37 | "matches":["https://studyh5.zhihuishu.com/videoStudy.html*","http://studyh5.zhihuishu.com/videoStudy.html*"], 38 | "js":["js/settings.js","js/zhsvideofuck.js"], 39 | "css":["css/zhsvideofuck.css"] 40 | }, 41 | { 42 | "matches":["https://*.ananas.chaoxing.com/video/*","http://*.ananas.chaoxing.com/video/*"], 43 | "js":["js/settings.js","js/videoalone.js"], 44 | "css":["css/videoalone.css"] 45 | }, 46 | { 47 | "matches": ["https://stuonline.zhihuishu.com/stuonline/folder/stuIndexV2*", "http://stuonline.zhihuishu.com/stuonline/folder/stuIndexV2*"], 48 | "js": ["js/zhfuckembedppt.js"] 49 | }], 50 | "options_page":"options.html", 51 | "browser_action": 52 | { 53 | "default_popup":"license.html" 54 | }, 55 | "icons": 56 | { 57 | "16":"ico/16.png", 58 | "32":"ico/32.png", 59 | "48":"ico/48.png", 60 | "128":"ico/128.png" 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /options.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 超星学习通辅助插件-选项 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |

选项设置

12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
默认开启视频暂停后自动播放
该设置仅作用于学习通
默认开启音频暂停后自动播放
默认隐藏弹幕行
默认显示视频插件控制面板
该设置仅作用于学习通
默认显示音频控制台
默认显示书籍插件控制面板
默认显示pdf控制面板
默认显示ppt控制面板
默认显示文本框控制面板
文本框显示默认使用文本
默认显示专题控制面板
默认自动滚动时自动加载内容
该项设置仅专题页面有效。
注:有时候会出现加载不出来的情况。(这是超星学习通错误处理没做好的问题,不是我的锅)
默认自动加载所有内容
该项设置仅专题页面有效。
注:当内容特别多的时候会RAM爆炸,请谨慎使用。
默认开启视频暂停后自动播放
该设置仅作用于智慧树
默认显示视频插件控制面板
该设置仅作用于智慧树
默认拦截问答弹窗
该设置仅作用于智慧树
默认完成度100%时跳转至下一个视频
该设置仅作用于智慧树
启用浏览器自带播放器扩展控制台
只支持部分网址
默认显示浏览器自带播放器扩展控制台
只支持部分网址
默认用自建播放器替代自带HTML5播放器
该设置仅作用于学习通HTML5视频
默认用自建播放器替代自带flash播放器
该设置仅作用于学习通flash视频
自动检测超星学习通活动状态并通知
该功能开启“关闭 Google Chrome 后继续运行后台应用”后效果更好。
38 |
39 | 40 | 41 | -------------------------------------------------------------------------------- /ownh5help.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 自建H5播放器帮助 4 | 5 | 6 | 7 | 8 | 9 |

自建H5播放帮助

10 |
快捷键: 11 | 1、
F
全屏/取消全屏 12 | 2、
P
打开/取消画中画 13 | 3、
W
打开/关闭字幕 14 | 4、
S
下一个字幕轨 15 | 5、
←/→
后退/快进5秒 16 | 6、
Ctrl + ←/→
后退/快进60秒 17 | 7、
Ctrl + ↑/↓
速度加快/减慢0.1倍 18 | 8、
Shift + ←/→
后退/快进15秒 19 | 9、
V
切换画质 20 | 10、
Shift + R
重置播放速度为1倍
21 | 22 | 23 | --------------------------------------------------------------------------------