├── .github └── ISSUE_TEMPLATE ├── LICENSE ├── README.md ├── youtube.js └── youtube └── html ├── index.html └── src ├── css ├── main.css ├── rangeSlider.min.css └── sweetalert2.min.css ├── fonts └── AlternateGothic2.ttf ├── img ├── play.png └── sinusbot-quad.png ├── js ├── bootstrap.min.js ├── jquery.min.js ├── jquery.min.map ├── main.js ├── rangeSlider.min.js └── sweetalert2.js └── templates └── yt.html /.github/ISSUE_TEMPLATE: -------------------------------------------------------------------------------- 1 | [Short description of problem here] 2 | 3 | **Reproduction Steps:** 4 | 5 | [First Step] 6 | [Second Step] 7 | [Other Steps...] 8 | 9 | **Expected behavior:** 10 | 11 | [Describe expected behavior here] 12 | 13 | **Observed behavior:** 14 | 15 | [Describe observed behavior here] 16 | 17 | **Sinusbot version:** [Enter the exact Sinusbot version here] 18 | **OS and version:** [Enter OS name and version here] 19 | **Used Browser and version:** [Enter Browser name and version here] 20 | 21 | **Browser Console Logs:** 22 | ***Chrome:*** 23 | 24 | 1. Press `Ctrl + Shift + I` at the same time in a Browser window 25 | 2. Select in the appearing menu `Console` 26 | 3. Reload the page using `Ctrl + Shift + R` 27 | 4. Copy might be appearing errors into the issue with ```` 28 | 29 | **Diagnostic ** 30 | Execute the script on [this page](https://forum.sinusbot.com/threads/diagsinusbot-sh-sinusbot-diagnostic-script.831/#post-4418) and post the output here. 31 | -------------------------------------------------------------------------------- /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 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 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 | {project} Copyright (C) {year} {fullname} 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 | # Youtube Webinterface for the Sinusbot 2 | 3 | check out the [github.io page](http://mxschmitt.github.io/YoutubeWebinterface/) or the [forum thread](https://forum.sinusbot.com/resources/youtube-webinterface.95) for more information. 4 | 5 | Developed by [@mxschmitt](https://github.com/mxschmitt) / [mxschmitt](https://forum.sinusbot.com/members/mxschmitt.1901/) and [@irgendwr](https://github.com/irgendwr) / [irgendwer](https://forum.sinusbot.com/members/irgendwer.1213/). 6 | 7 | Copyright (c) 2018, Max Schmitt 8 | All rights reserved. 9 | -------------------------------------------------------------------------------- /youtube.js: -------------------------------------------------------------------------------- 1 | registerPlugin({ 2 | name: 'Youtube Webinterface!', 3 | version: '3.0', 4 | description: 'Youtube Webinterface for playing and downloading YouTube Tracks.', 5 | author: 'mxschmitt & irgendwer ', 6 | backends: ['ts3', 'discord'], 7 | enableWeb: true, 8 | requiredModules: ["http"], 9 | vars: [{ 10 | name: 'ytApiKey', 11 | title: 'Youtube API Key (see the tutorial for instructions)', 12 | type: 'string' 13 | }, { 14 | name: 'play', 15 | title: 'enable playing (default activated)', 16 | type: 'select', 17 | options: ['on', 'off'] 18 | }, { 19 | name: 'dl', 20 | title: 'enable downloading (default activated)', 21 | type: 'select', 22 | options: ['on', 'off'] 23 | }, { 24 | name: 'enq', 25 | title: 'enable enqueuing (default activated)', 26 | type: 'select', 27 | options: ['on', 'off'] 28 | }, { 29 | name: 'ytAlllowed', 30 | title: 'Allowed group Ids split by comma without space who are allowed to use the "!playlist " command.', 31 | type: 'string' 32 | }, 33 | // { 34 | // name: 'ytDirectSearch', 35 | // title: 'Enable the direct search for youtube via the normal webinterface. Enable it only on 1 instance!', 36 | // type: 'checkbox' 37 | // } 38 | ] 39 | }, (_, config) => { 40 | const errorMessages = { 41 | NoPermission: "Do you have enough permissions for this action?", 42 | DLDisabled: "Downloading is not enabled.", 43 | EQDisabled: "Enqueuing is not enabled.", 44 | PlayDisabled: "Playing is not enabled.", 45 | NoAPIKey: "No Youtube API Key set." 46 | }; 47 | const engine = require('engine'); 48 | const store = require('store'); 49 | const event = require('event'); 50 | const media = require('media'); 51 | const http = require('http'); 52 | const format = require('format'); 53 | 54 | engine.log("YTWeb Webinterface Ready"); 55 | 56 | // if (config.ytDirectSearch && (config.ytApiKey || store.get("ytapikey"))) { 57 | // sinusbot.registerHandler({ 58 | // isHandlerFor(url) { 59 | // if (url.substring(0, 6) == 'ytwiyt') { 60 | // return true; 61 | // } 62 | // if (/youtube\.com/.test(url)) { 63 | // return true; 64 | // } 65 | // return false; 66 | // }, 67 | // getTrackInfo(url, cb) { 68 | // if (/youtube\.com/.test(url)) { 69 | // return cb({ 70 | // urlType: 'ytdl', 71 | // url 72 | // }); 73 | // } 74 | // return cb({ 75 | // urlType: 'ytdl', 76 | // url: url.substring(19) 77 | // }); 78 | // }, 79 | // getSearchResult(search, cb) { 80 | // engine.log("Youtube triggered."); 81 | // sinusbot.http({ 82 | // timeout: 6000, 83 | // url: `https://www.googleapis.com/youtube/v3/search?part=snippet&q=${encodeURIComponent(search)}&maxResults=20&type=video&key=${encodeURIComponent(store.get("ytapikey"))}` 84 | // }, (err, data) => { 85 | // if (err || !data || data.statusCode != 200) { 86 | // return cb(null); 87 | // } 88 | // const result = []; 89 | // var data = JSON.parse(data.data); 90 | // if (!data || !data.items) { 91 | // engine.log('Error in json'); 92 | // return cb(null); 93 | // } 94 | // data.items.forEach(({snippet, id}) => { 95 | // result.push({ 96 | // title: snippet.title, 97 | // artist: snippet.channelTitle, 98 | // coverUrl: snippet.thumbnails.default.url, 99 | // url: `ytwiyt://ytdl/?url=${encodeURIComponent(id.videoId)}` 100 | // }); 101 | // }); 102 | // return cb(result); 103 | // }); 104 | // } 105 | // }); 106 | // } else { 107 | // engine.log(errorMessages.NoAPIKey); 108 | // } 109 | 110 | event.on('chat', ({ text, client }) => { 111 | if (text.startsWith("!playlist ")) { 112 | let playlistID; 113 | let playlistURL; 114 | let amount = 10; 115 | const _tmpSplit = text.replace("[URL]", "").replace("[/URL]", "").split(" "); 116 | playlistURL = _tmpSplit[1] 117 | if (_tmpSplit.length > 2) { 118 | amount = _tmpSplit[2]; 119 | } 120 | playlistID = getGetParameter(playlistURL, "list"); 121 | if (playlistID.length == 34) { 122 | let authorized = false; 123 | client.getServerGroups().forEach(group => { 124 | if (config.ytAlllowed.split(",").includes(group.id())) { 125 | authorized = true; 126 | return true; 127 | } 128 | }); 129 | if (authorized) { 130 | http.simpleRequest({ 131 | method: "GET", 132 | url: `https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&maxResults=${amount}&playlistId=${encodeURIComponent(playlistID)}&key=${encodeURIComponent(store.get("ytapikey"))}`, 133 | timeout: 6000, 134 | }, (error, { statusCode, data }) => { 135 | if (statusCode != 200) { 136 | engine.log(error); 137 | return; 138 | } 139 | const response = JSON.parse(data); 140 | let timeout = 0; 141 | engine.log(`${response.items.length} results.`); 142 | response.items.forEach(({ snippet }) => { 143 | client.chat(`Adding ${format.bold(snippet.title)} to queue.`); 144 | timeout += 10000; 145 | setTimeout(() => { 146 | media.enqueueYt(`https://www.youtube.com/watch?v=${snippet.resourceId.videoId}`); 147 | }, timeout); 148 | }); 149 | }); 150 | } else { 151 | client.chat("Not authorized!"); 152 | } 153 | } else { 154 | client.chat(`Error: Invalid url (list = ${playlistID})`); 155 | } 156 | } else if ((text === "!ytplaylist") || (text === "!ytplaylist help")) { 157 | client.chat("When you authorized (set your groupID in the script settings) you can enqueue a complete playlist via a chat message."); 158 | client.chat("E.g. '!playlist https://www.youtube.com/playlist?list=PLKOXXePgWciOO61ZUSzTDQQGyD_546BGA'"); 159 | } 160 | }); 161 | 162 | if (typeof config.ytApiKey != 'undefined') { 163 | store.set("ytapikey", config.ytApiKey); 164 | } 165 | 166 | event.on('api:ytplay', ev => { 167 | const res = new Response(); 168 | // Check for PRIV_PLAYBACK 169 | if (!ev.user() || !ev.user().privileges || (ev.user().privileges() & 0x1000) == 0) { 170 | res.setError(errorMessages.NoPermission); 171 | return res.getData(); 172 | } 173 | if (config.play != 1) { 174 | media.yt(ev.data()); 175 | engine.log(`YTWeb Triggered with "played" at ${ev.data()}`); 176 | res.setData("The Video will be sucessfully played now."); 177 | return res.getData(); 178 | } else { 179 | engine.log(`YTWeb tried to play ${ev.data()} but it was deactivated.`); 180 | res.setError(errorMessages.PlayDisabled); 181 | return res.getData(); 182 | } 183 | }); 184 | 185 | event.on('api:ytenq', ev => { 186 | const res = new Response(); 187 | // Check for PRIV_ENQUEUE 188 | if (!ev.user() || !ev.user().privileges || (ev.user().privileges() & 0x2000) == 0) { 189 | res.setError(errorMessages.NoPermission); 190 | return res.getData(); 191 | } 192 | if (config.enq != 1) { 193 | media.enqueueYt(ev.data()); 194 | engine.log(`YTWeb Triggered with "enque" at ${ev.data()}`); 195 | res.setData("The Video will be sucessfully enqueued now."); 196 | return res.getData(); 197 | } else { 198 | engine.log(`YTWeb tried to play ${ev.data()} but it was deactivated.`); 199 | res.setError(errorMessages.EQDisabled); 200 | return res.getData(); 201 | } 202 | }); 203 | 204 | event.on('api:ytdl', ev => { 205 | const res = new Response(); 206 | // Check for PRIV_UPLOAD_FILE 207 | if (!ev.user || !ev.user().privileges || (ev.user().privileges() & 0x4) == 0) { 208 | res.setError(errorMessages.NoPermission); 209 | return res.getData(); 210 | } 211 | if (config.dl != 1) { 212 | media.ytdl(ev.data(), false); 213 | engine.log(`YTWeb Triggered with "downloaded" at ${ev.data()}`); 214 | res.setData("The Video will be sucessfully downloaded now."); 215 | return res.getData(); 216 | } else { 217 | engine.log(`YTWeb tried to download ${ev.data()} but it was deactivated.`); 218 | res.setError(errorMessages.DLDisabled); 219 | return res.getData(); 220 | } 221 | }); 222 | 223 | event.on('api:ytwebconfig', ev => ({ 224 | data: { 225 | play: config.play != 1, 226 | enqueue: config.enq != 1, 227 | download: config.dl != 1, 228 | ytapikey: store.get("ytapikey") 229 | } 230 | })); 231 | 232 | class Response { 233 | constructor() { 234 | this.success = true; 235 | this.data = null; 236 | } 237 | setData(data) { 238 | this.data = data; 239 | } 240 | getData() { 241 | return { 242 | data: this.data, 243 | success: this.success 244 | } 245 | } 246 | setError(error) { 247 | this.success = false; 248 | this.data = error; 249 | }; 250 | } 251 | 252 | function getGetParameter(url, name) { 253 | name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); 254 | const regexS = `[\\?&]${name}=([^&#]*)`; 255 | const regex = new RegExp(regexS); 256 | const results = regex.exec(url); 257 | return results == null ? null : results[1]; 258 | } 259 | }); 260 | -------------------------------------------------------------------------------- /youtube/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Sinusbot | Youtube Webinterface 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 |
29 |

Youtube Search

30 | 31 |  Back 32 | 33 |
34 |
35 |
36 |
37 | 38 | 39 | 40 |
41 | 42 |
43 |
44 | 45 | 46 | 47 | 50 | 53 | 56 | 59 | 62 | 63 | 64 |
48 | 49 | 51 | 52 | 54 | 55 | 57 | 58 | 60 | 61 |
65 |
66 |
67 | 68 |
69 |
70 |
71 |
72 |
73 | 81 |
82 |   83 | 84 |
85 |
86 |
87 | 88 |
89 | 92 | 93 |
94 |
95 |

96 | 97 |

98 |
99 |
100 |
101 |
102 | 105 |
106 |
107 |
108 | 116 | 117 | 118 | 119 | 120 | 121 | -------------------------------------------------------------------------------- /youtube/html/src/css/main.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: AlternateGothic2; 3 | src: url('../fonts/AlternateGothic2.ttf'); 4 | } 5 | .jumbotron { 6 | margin-top: 15px; 7 | background: url(/img/sinusbot-logo.png); 8 | background-size: 17%; 9 | background-repeat: no-repeat; 10 | background-color: #d9230f; 11 | background-position: 99% 95%; 12 | } 13 | #copyright { 14 | display: inline; 15 | } 16 | #yt { 17 | text-align: center; 18 | margin-top: -10px; 19 | font-family: AlternateGothic2; 20 | color: white; 21 | font-size: 4em; 22 | } 23 | .none { 24 | display: none; 25 | } 26 | #loadmore { 27 | display: none; 28 | margin: 0 auto; 29 | clear: both; 30 | } 31 | #results { 32 | padding-left: 15px; 33 | padding-right: 15px; 34 | } 35 | .videos { 36 | margin: 5px; 37 | padding-right: 15px; 38 | padding-left: 20px; 39 | } 40 | .ytframe { 41 | margin: 0; 42 | width: 100%; 43 | margin-bottom: 15px; 44 | } 45 | .youtube-container { 46 | display: block; 47 | width: 100%; 48 | } 49 | .youtube-player { 50 | padding-bottom: 56.25%; 51 | margin-top: 15px; 52 | overflow: hidden; 53 | height: 100%; 54 | cursor: pointer; 55 | } 56 | img.youtube-thumb { 57 | bottom: 0; 58 | display: block; 59 | left: 0; 60 | margin: auto; 61 | max-width: 100%; 62 | width: 100%; 63 | position: absolute; 64 | right: 0; 65 | top: 0; 66 | height: auto; 67 | } 68 | div.play-button { 69 | height: 72px; 70 | width: 72px; 71 | left: 50%; 72 | top: 50%; 73 | margin-left: -36px; 74 | margin-top: -36px; 75 | position: absolute; 76 | background: url(../img/play.png) no-repeat; 77 | } 78 | #youtube-iframe { 79 | width: 100%; 80 | height: 100%; 81 | position: absolute; 82 | top: 0; 83 | left: 0; 84 | } 85 | .btnmarginfive { 86 | margin-left: 5px; 87 | margin-bottom: 5px; 88 | } 89 | #spanover5px { 90 | margin-left: -5px; 91 | } 92 | #backButton { 93 | position: absolute; 94 | left: 0; 95 | top: 0; 96 | } 97 | .videos > h3 { 98 | margin-top: 10px; 99 | } 100 | .fright { 101 | float: right; 102 | } 103 | .v-font { 104 | font-size: 1em; 105 | } 106 | .rangeSlider { 107 | margin-top: 20px; 108 | } 109 | .v-controls { 110 | cursor: pointer; 111 | } 112 | .swal2-content { 113 | color: black; 114 | } 115 | @media (max-width: 992px) { 116 | .videos { 117 | width: calc(100% - 10px); 118 | } 119 | .panel-body { 120 | text-align: center; 121 | } 122 | .channelname { 123 | font-size: 1.4em; 124 | } 125 | } 126 | @media (min-width: 992px) { 127 | .videos { 128 | width: calc(50% - 10px); 129 | } 130 | .va-title { 131 | margin-top: 10px; 132 | } 133 | .channelname { 134 | position: inherit; 135 | float: right; 136 | right: 5px; 137 | top: 5px; 138 | font-size: 1.4em; 139 | } 140 | } -------------------------------------------------------------------------------- /youtube/html/src/css/rangeSlider.min.css: -------------------------------------------------------------------------------- 1 | .rangeSlider,.rangeSlider__fill{background:#7f8c8d;display:block;height:20px;width:100%;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.3);-moz-box-shadow:inset 0 1px 3px rgba(0,0,0,.3);box-shadow:inset 0 1px 3px rgba(0,0,0,.3);-webkit-border-radius:10px;-moz-border-radius:10px;-ms-border-radius:10px;-o-border-radius:10px;border-radius:10px}.rangeSlider{position:relative}.rangeSlider--disabled{filter:alpha(Opacity=40);opacity:.4}.rangeSlider__fill{background:#f3331F;position:absolute;top:0;z-index:2}.rangeSlider__handle{background:#fff;border:1px solid #ccc;cursor:pointer;display:inline-block;width:40px;height:40px;position:absolute;top:-10px;z-index:3;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,rgba(255,255,255,0)),color-stop(100%,rgba(0,0,0,.1)));background-image:-webkit-linear-gradient(rgba(255,255,255,0),rgba(0,0,0,.1));background-image:-moz-linear-gradient(rgba(255,255,255,0),rgba(0,0,0,.1));background-image:-o-linear-gradient(rgba(255,255,255,0),rgba(0,0,0,.1));background-image:linear-gradient(rgba(255,255,255,0),rgba(0,0,0,.1));-webkit-box-shadow:0 0 8px rgba(0,0,0,.3);-moz-box-shadow:0 0 8px rgba(0,0,0,.3);box-shadow:0 0 8px rgba(0,0,0,.3);-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%}.rangeSlider__handle:after{content:"";display:block;width:18px;height:18px;margin:auto;position:absolute;top:0;right:0;bottom:0;left:0;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,rgba(0,0,0,.13)),color-stop(100%,rgba(255,255,255,0)));background-image:-webkit-linear-gradient(rgba(0,0,0,.13),rgba(255,255,255,0));background-image:-moz-linear-gradient(rgba(0,0,0,.13),rgba(255,255,255,0));background-image:-o-linear-gradient(rgba(0,0,0,.13),rgba(255,255,255,0));background-image:linear-gradient(rgba(0,0,0,.13),rgba(255,255,255,0));-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%}.rangeSlider__handle:active{background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,rgba(0,0,0,.1)),color-stop(100%,rgba(0,0,0,.12)));background-image:-webkit-linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.12));background-image:-moz-linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.12));background-image:-o-linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.12));background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.12))}input[type=range]:focus+.rangeSlider .rangeSlider__handle{-webkit-box-shadow:0 0 8px rgba(142,68,173,.9);-moz-box-shadow:0 0 8px rgba(142,68,173,.9);box-shadow:0 0 8px rgba(142,68,173,.9)}.rangeSlider__buffer{z-index:1;position:absolute;top:3px;height:14px;background:#2c3e50;border-radius:10px} -------------------------------------------------------------------------------- /youtube/html/src/css/sweetalert2.min.css: -------------------------------------------------------------------------------- 1 | 2 | .sweet-alert,.sweet-overlay{position:fixed;display:none}.sweet-alert button.styled:focus,.sweet-alert:focus{outline:0}.sweet-overlay{background-color:rgba(0,0,0,.4);left:0;right:0;top:0;bottom:0;z-index:1000}.sweet-alert{background-color:#fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;border-radius:5px;box-sizing:border-box;text-align:center;left:50%;top:50%;margin-top:-200px;max-height:90%;overflow-x:hidden;overflow-y:auto;z-index:2000}.sweet-alert h2,.sweet-alert p{text-align:center;position:relative;margin:0;padding:0}.sweet-alert.loading{overflow-y:hidden}.sweet-alert h2{color:#575757;font-size:30px;font-weight:600;text-transform:none;line-height:60px;display:block}.sweet-alert p{font-size:16px;font-weight:300;float:none;line-height:normal}.sweet-alert hr{height:10px;color:transparent;border:0}.sweet-alert button.styled{color:#fff;border:0;box-shadow:none;font-size:17px;font-weight:500;border-radius:5px;padding:10px 32px;margin:0 5px;cursor:pointer}.sweet-alert button.styled[disabled]{opacity:.4;cursor:no-drop}.sweet-alert button.styled.loading{box-sizing:border-box;border:4px solid transparent;width:40px;height:40px;padding:0;margin:-2px 30px;vertical-align:top;background-color:transparent!important;color:transparent;cursor:default;border-radius:100%;-webkit-animation:rotate-loading 1.5s linear 0s infinite normal;animation:rotate-loading 1.5s linear 0s infinite normal}.sweet-alert .sweet-image,.sweet-icon{margin:20px auto}.sweet-alert button.styled::-moz-focus-inner{border:0}.sweet-alert .sweet-close{font-size:36px;line-height:36px;font-family:serif;position:absolute;top:15px;right:24px;cursor:pointer;color:#cfcfcf;-webkit-transition:all .1s ease;transition:all .1s ease}.sweet-alert .sweet-close:hover{color:#d55}.sweet-icon{width:80px;height:80px;border:4px solid grey;border-radius:50%;padding:0;position:relative;box-sizing:content-box;cursor:default;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.sweet-icon.sweet-error{border-color:#f27474}.sweet-icon.sweet-error .x-mark{position:relative;display:block}.sweet-icon.sweet-error .line{position:absolute;height:5px;width:47px;background-color:#f27474;display:block;top:37px;border-radius:2px}.sweet-icon.sweet-error .line.left{-webkit-transform:rotate(45deg);transform:rotate(45deg);left:17px}.sweet-icon.sweet-error .line.right{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);right:16px}.sweet-icon.sweet-warning{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;color:#f8bb86;border-color:#f8bb86;font-size:60px;line-height:80px;text-align:center}.sweet-icon.sweet-info,.sweet-icon.sweet-question{color:#c9dae1;border-color:#c9dae1;font-size:60px;line-height:80px;text-align:center}.sweet-icon.sweet-info{font-family:"Open Sans",sans-serif}.sweet-icon.sweet-question{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.sweet-icon.sweet-success{border-color:#a5dc86}.sweet-icon.sweet-success::after,.sweet-icon.sweet-success::before{content:'';position:absolute;width:60px;height:120px;background:#fff}.sweet-icon.sweet-success::before{border-radius:120px 0 0 120px;top:-7px;left:-33px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:60px 60px;transform-origin:60px 60px}.sweet-icon.sweet-success::after{border-radius:0 120px 120px 0;top:-11px;left:30px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:0 60px;transform-origin:0 60px}.sweet-icon.sweet-success .placeholder{width:80px;height:80px;border:4px solid rgba(165,220,134,.2);border-radius:50%;box-sizing:content-box;position:absolute;left:-4px;top:-4px;z-index:2}.sweet-icon.sweet-success .fix{width:7px;height:90px;background-color:#fff;position:absolute;left:28px;top:8px;z-index:1;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.sweet-icon.sweet-success .line{height:5px;background-color:#a5dc86;display:block;border-radius:2px;position:absolute;z-index:2}.sweet-icon.sweet-success .line.tip{width:25px;left:14px;top:46px;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.sweet-icon.sweet-success .line.long{width:47px;right:8px;top:38px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}@-webkit-keyframes showSweetAlert{0%{-webkit-transform:scale(.7);transform:scale(.7)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes showSweetAlert{0%{-webkit-transform:scale(.7);transform:scale(.7)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hideSweetAlert{0%{-webkit-transform:scale(1);transform:scale(1)}100%{-webkit-transform:scale(.5);transform:scale(.5)}}@keyframes hideSweetAlert{0%{-webkit-transform:scale(1);transform:scale(1)}100%{-webkit-transform:scale(.5);transform:scale(.5)}}.show-sweet-alert{-webkit-animation:showSweetAlert .3s;animation:showSweetAlert .3s}.show-sweet-alert.no-animation{-webkit-animation:none;animation:none}.hide-sweet-alert{-webkit-animation:hideSweetAlert .2s;animation:hideSweetAlert .2s}.hide-sweet-alert.no-animation{-webkit-animation:none;animation:none}@-webkit-keyframes animate-success-tip{0%,54%{width:0;left:1px;top:19px}70%{width:50px;left:-8px;top:37px}84%{width:17px;left:21px;top:48px}100%{width:25px;left:14px;top:45px}}@keyframes animate-success-tip{0%,54%{width:0;left:1px;top:19px}70%{width:50px;left:-8px;top:37px}84%{width:17px;left:21px;top:48px}100%{width:25px;left:14px;top:45px}}@-webkit-keyframes animate-success-long{0%,65%{width:0;right:46px;top:54px}84%{width:55px;right:0;top:35px}100%{width:47px;right:8px;top:38px}}@keyframes animate-success-long{0%,65%{width:0;right:46px;top:54px}84%{width:55px;right:0;top:35px}100%{width:47px;right:8px;top:38px}}@-webkit-keyframes rotatePlaceholder{0%,5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}100%,12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}@keyframes rotatePlaceholder{0%,5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}100%,12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}.animate-success-tip{-webkit-animation:animate-success-tip .75s;animation:animate-success-tip .75s}.animate-success-long{-webkit-animation:animate-success-long .75s;animation:animate-success-long .75s}.sweet-icon.sweet-success.animate::after{-webkit-animation:rotatePlaceholder 4.25s ease-in;animation:rotatePlaceholder 4.25s ease-in}@-webkit-keyframes animate-error-icon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}100%{-webkit-transform:rotateX(0);transform:rotateX(0);opacity:1}}@keyframes animate-error-icon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}100%{-webkit-transform:rotateX(0);transform:rotateX(0);opacity:1}}.animate-error-icon{-webkit-animation:animate-error-icon .5s;animation:animate-error-icon .5s}@-webkit-keyframes animate-x-mark{0%,50%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}80%{-webkit-transform:scale(1.15);transform:scale(1.15);margin-top:-6px}100%{-webkit-transform:scale(1);transform:scale(1);margin-top:0;opacity:1}}@keyframes animate-x-mark{0%,50%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}80%{-webkit-transform:scale(1.15);transform:scale(1.15);margin-top:-6px}100%{-webkit-transform:scale(1);transform:scale(1);margin-top:0;opacity:1}}.animate-x-mark{-webkit-animation:animate-x-mark .5s;animation:animate-x-mark .5s}@-webkit-keyframes pulse-warning{0%{border-color:#f8d486}100%{border-color:#f8bb86}}@keyframes pulse-warning{0%{border-color:#f8d486}100%{border-color:#f8bb86}}.pulse-warning{-webkit-animation:pulse-warning .75s infinite alternate;animation:pulse-warning .75s infinite alternate}@-webkit-keyframes rotate-loading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate-loading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}} 3 | 4 | .sweet-overlay { 5 | background-color: rgba(0, 0, 0, 0.4); 6 | position: fixed; 7 | left: 0; 8 | right: 0; 9 | top: 0; 10 | bottom: 0; 11 | display: none; 12 | z-index: 1000; } 13 | 14 | .sweet-alert { 15 | background-color: #fff; 16 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 17 | border-radius: 5px; 18 | box-sizing: border-box; 19 | text-align: center; 20 | position: fixed; 21 | left: 50%; 22 | top: 50%; 23 | margin-top: -200px; 24 | max-height: 90%; 25 | overflow-x: hidden; 26 | overflow-y: auto; 27 | display: none; 28 | z-index: 2000; } 29 | .sweet-alert:focus { 30 | outline: none; } 31 | .sweet-alert.loading { 32 | overflow-y: hidden; } 33 | .sweet-alert h2 { 34 | color: #575757; 35 | font-size: 30px; 36 | text-align: center; 37 | font-weight: 600; 38 | text-transform: none; 39 | position: relative; 40 | margin: 0; 41 | padding: 0; 42 | line-height: 60px; 43 | display: block; } 44 | .sweet-alert p { 45 | font-size: 16px; 46 | text-align: center; 47 | font-weight: 300; 48 | position: relative; 49 | float: none; 50 | margin: 0; 51 | padding: 0; 52 | line-height: normal; } 53 | .sweet-alert hr { 54 | height: 10px; 55 | color: transparent; 56 | border: 0; } 57 | .sweet-alert button.styled { 58 | color: #fff; 59 | border: 0; 60 | box-shadow: none; 61 | font-size: 17px; 62 | font-weight: 500; 63 | border-radius: 5px; 64 | padding: 10px 32px; 65 | margin: 0 5px; 66 | cursor: pointer; } 67 | .sweet-alert button.styled:focus { 68 | outline: none; } 69 | .sweet-alert button.styled[disabled] { 70 | opacity: .4; 71 | cursor: no-drop; } 72 | .sweet-alert button.styled.loading { 73 | box-sizing: border-box; 74 | border: 4px solid transparent; 75 | border-color: transparent; 76 | width: 40px; 77 | height: 40px; 78 | padding: 0; 79 | margin: -2px 30px; 80 | vertical-align: top; 81 | background-color: transparent !important; 82 | color: transparent; 83 | cursor: default; 84 | border-radius: 100%; 85 | -webkit-animation: rotate-loading 1.5s linear 0s infinite normal; 86 | animation: rotate-loading 1.5s linear 0s infinite normal; } 87 | .sweet-alert button.styled::-moz-focus-inner { 88 | border: 0; } 89 | .sweet-alert .sweet-image { 90 | margin: 20px auto; } 91 | .sweet-alert .sweet-close { 92 | font-size: 36px; 93 | line-height: 36px; 94 | font-family: serif; 95 | position: absolute; 96 | top: 15px; 97 | right: 24px; 98 | cursor: pointer; 99 | color: #cfcfcf; 100 | -webkit-transition: all 0.1s ease; 101 | transition: all 0.1s ease; } 102 | .sweet-alert .sweet-close:hover { 103 | color: #d55; } 104 | 105 | .sweet-icon { 106 | width: 80px; 107 | height: 80px; 108 | border: 4px solid #808080; 109 | border-radius: 50%; 110 | margin: 20px auto; 111 | padding: 0; 112 | position: relative; 113 | box-sizing: content-box; 114 | cursor: default; 115 | /* http://stackoverflow.com/a/4407335/1331425 */ 116 | -webkit-touch-callout: none; 117 | -webkit-user-select: none; 118 | -moz-user-select: none; 119 | -ms-user-select: none; 120 | user-select: none; } 121 | .sweet-icon.sweet-error { 122 | border-color: #f27474; } 123 | .sweet-icon.sweet-error .x-mark { 124 | position: relative; 125 | display: block; } 126 | .sweet-icon.sweet-error .line { 127 | position: absolute; 128 | height: 5px; 129 | width: 47px; 130 | background-color: #f27474; 131 | display: block; 132 | top: 37px; 133 | border-radius: 2px; } 134 | .sweet-icon.sweet-error .line.left { 135 | -webkit-transform: rotate(45deg); 136 | transform: rotate(45deg); 137 | left: 17px; } 138 | .sweet-icon.sweet-error .line.right { 139 | -webkit-transform: rotate(-45deg); 140 | transform: rotate(-45deg); 141 | right: 16px; } 142 | .sweet-icon.sweet-warning { 143 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 144 | color: #f8bb86; 145 | border-color: #f8bb86; 146 | font-size: 60px; 147 | line-height: 80px; 148 | text-align: center; } 149 | .sweet-icon.sweet-info { 150 | font-family: "Open Sans", sans-serif; 151 | color: #c9dae1; 152 | border-color: #c9dae1; 153 | font-size: 60px; 154 | line-height: 80px; 155 | text-align: center; } 156 | .sweet-icon.sweet-question { 157 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 158 | color: #c9dae1; 159 | border-color: #c9dae1; 160 | font-size: 60px; 161 | line-height: 80px; 162 | text-align: center; } 163 | .sweet-icon.sweet-success { 164 | border-color: #a5dc86; } 165 | .sweet-icon.sweet-success::before, .sweet-icon.sweet-success::after { 166 | content: ''; 167 | border-radius: 50%; 168 | position: absolute; 169 | width: 60px; 170 | height: 120px; 171 | background: #fff; 172 | -webkit-transform: rotate(45deg); 173 | transform: rotate(45deg); } 174 | .sweet-icon.sweet-success::before { 175 | border-radius: 120px 0 0 120px; 176 | top: -7px; 177 | left: -33px; 178 | -webkit-transform: rotate(-45deg); 179 | transform: rotate(-45deg); 180 | -webkit-transform-origin: 60px 60px; 181 | transform-origin: 60px 60px; } 182 | .sweet-icon.sweet-success::after { 183 | border-radius: 0 120px 120px 0; 184 | top: -11px; 185 | left: 30px; 186 | -webkit-transform: rotate(-45deg); 187 | transform: rotate(-45deg); 188 | -webkit-transform-origin: 0 60px; 189 | transform-origin: 0 60px; } 190 | .sweet-icon.sweet-success .placeholder { 191 | width: 80px; 192 | height: 80px; 193 | border: 4px solid rgba(165, 220, 134, 0.2); 194 | border-radius: 50%; 195 | box-sizing: content-box; 196 | position: absolute; 197 | left: -4px; 198 | top: -4px; 199 | z-index: 2; } 200 | .sweet-icon.sweet-success .fix { 201 | width: 7px; 202 | height: 90px; 203 | background-color: #fff; 204 | position: absolute; 205 | left: 28px; 206 | top: 8px; 207 | z-index: 1; 208 | -webkit-transform: rotate(-45deg); 209 | transform: rotate(-45deg); } 210 | .sweet-icon.sweet-success .line { 211 | height: 5px; 212 | background-color: #a5dc86; 213 | display: block; 214 | border-radius: 2px; 215 | position: absolute; 216 | z-index: 2; } 217 | .sweet-icon.sweet-success .line.tip { 218 | width: 25px; 219 | left: 14px; 220 | top: 46px; 221 | -webkit-transform: rotate(45deg); 222 | transform: rotate(45deg); } 223 | .sweet-icon.sweet-success .line.long { 224 | width: 47px; 225 | right: 8px; 226 | top: 38px; 227 | -webkit-transform: rotate(-45deg); 228 | transform: rotate(-45deg); } 229 | 230 | @-webkit-keyframes showSweetAlert { 231 | 0% { 232 | -webkit-transform: scale(0.7); 233 | transform: scale(0.7); } 234 | 45% { 235 | -webkit-transform: scale(1.05); 236 | transform: scale(1.05); } 237 | 80% { 238 | -webkit-transform: scale(0.95); 239 | transform: scale(0.95); } 240 | 100% { 241 | -webkit-transform: scale(1); 242 | transform: scale(1); } } 243 | 244 | @keyframes showSweetAlert { 245 | 0% { 246 | -webkit-transform: scale(0.7); 247 | transform: scale(0.7); } 248 | 45% { 249 | -webkit-transform: scale(1.05); 250 | transform: scale(1.05); } 251 | 80% { 252 | -webkit-transform: scale(0.95); 253 | transform: scale(0.95); } 254 | 100% { 255 | -webkit-transform: scale(1); 256 | transform: scale(1); } } 257 | 258 | @-webkit-keyframes hideSweetAlert { 259 | 0% { 260 | -webkit-transform: scale(1); 261 | transform: scale(1); } 262 | 100% { 263 | -webkit-transform: scale(0.5); 264 | transform: scale(0.5); } } 265 | 266 | @keyframes hideSweetAlert { 267 | 0% { 268 | -webkit-transform: scale(1); 269 | transform: scale(1); } 270 | 100% { 271 | -webkit-transform: scale(0.5); 272 | transform: scale(0.5); } } 273 | 274 | .show-sweet-alert { 275 | -webkit-animation: showSweetAlert 0.3s; 276 | animation: showSweetAlert 0.3s; } 277 | .show-sweet-alert.no-animation { 278 | -webkit-animation: none; 279 | animation: none; } 280 | 281 | .hide-sweet-alert { 282 | -webkit-animation: hideSweetAlert 0.2s; 283 | animation: hideSweetAlert 0.2s; } 284 | .hide-sweet-alert.no-animation { 285 | -webkit-animation: none; 286 | animation: none; } 287 | 288 | @-webkit-keyframes animate-success-tip { 289 | 0% { 290 | width: 0; 291 | left: 1px; 292 | top: 19px; } 293 | 54% { 294 | width: 0; 295 | left: 1px; 296 | top: 19px; } 297 | 70% { 298 | width: 50px; 299 | left: -8px; 300 | top: 37px; } 301 | 84% { 302 | width: 17px; 303 | left: 21px; 304 | top: 48px; } 305 | 100% { 306 | width: 25px; 307 | left: 14px; 308 | top: 45px; } } 309 | 310 | @keyframes animate-success-tip { 311 | 0% { 312 | width: 0; 313 | left: 1px; 314 | top: 19px; } 315 | 54% { 316 | width: 0; 317 | left: 1px; 318 | top: 19px; } 319 | 70% { 320 | width: 50px; 321 | left: -8px; 322 | top: 37px; } 323 | 84% { 324 | width: 17px; 325 | left: 21px; 326 | top: 48px; } 327 | 100% { 328 | width: 25px; 329 | left: 14px; 330 | top: 45px; } } 331 | 332 | @-webkit-keyframes animate-success-long { 333 | 0% { 334 | width: 0; 335 | right: 46px; 336 | top: 54px; } 337 | 65% { 338 | width: 0; 339 | right: 46px; 340 | top: 54px; } 341 | 84% { 342 | width: 55px; 343 | right: 0; 344 | top: 35px; } 345 | 100% { 346 | width: 47px; 347 | right: 8px; 348 | top: 38px; } } 349 | 350 | @keyframes animate-success-long { 351 | 0% { 352 | width: 0; 353 | right: 46px; 354 | top: 54px; } 355 | 65% { 356 | width: 0; 357 | right: 46px; 358 | top: 54px; } 359 | 84% { 360 | width: 55px; 361 | right: 0; 362 | top: 35px; } 363 | 100% { 364 | width: 47px; 365 | right: 8px; 366 | top: 38px; } } 367 | 368 | @-webkit-keyframes rotatePlaceholder { 369 | 0% { 370 | -webkit-transform: rotate(-45deg); 371 | transform: rotate(-45deg); } 372 | 5% { 373 | -webkit-transform: rotate(-45deg); 374 | transform: rotate(-45deg); } 375 | 12% { 376 | -webkit-transform: rotate(-405deg); 377 | transform: rotate(-405deg); } 378 | 100% { 379 | -webkit-transform: rotate(-405deg); 380 | transform: rotate(-405deg); } } 381 | 382 | @keyframes rotatePlaceholder { 383 | 0% { 384 | -webkit-transform: rotate(-45deg); 385 | transform: rotate(-45deg); } 386 | 5% { 387 | -webkit-transform: rotate(-45deg); 388 | transform: rotate(-45deg); } 389 | 12% { 390 | -webkit-transform: rotate(-405deg); 391 | transform: rotate(-405deg); } 392 | 100% { 393 | -webkit-transform: rotate(-405deg); 394 | transform: rotate(-405deg); } } 395 | 396 | .animate-success-tip { 397 | -webkit-animation: animate-success-tip 0.75s; 398 | animation: animate-success-tip 0.75s; } 399 | 400 | .animate-success-long { 401 | -webkit-animation: animate-success-long 0.75s; 402 | animation: animate-success-long 0.75s; } 403 | 404 | .sweet-icon.sweet-success.animate::after { 405 | -webkit-animation: rotatePlaceholder 4.25s ease-in; 406 | animation: rotatePlaceholder 4.25s ease-in; } 407 | 408 | @-webkit-keyframes animate-error-icon { 409 | 0% { 410 | -webkit-transform: rotateX(100deg); 411 | transform: rotateX(100deg); 412 | opacity: 0; } 413 | 100% { 414 | -webkit-transform: rotateX(0deg); 415 | transform: rotateX(0deg); 416 | opacity: 1; } } 417 | 418 | @keyframes animate-error-icon { 419 | 0% { 420 | -webkit-transform: rotateX(100deg); 421 | transform: rotateX(100deg); 422 | opacity: 0; } 423 | 100% { 424 | -webkit-transform: rotateX(0deg); 425 | transform: rotateX(0deg); 426 | opacity: 1; } } 427 | 428 | .animate-error-icon { 429 | -webkit-animation: animate-error-icon 0.5s; 430 | animation: animate-error-icon 0.5s; } 431 | 432 | @-webkit-keyframes animate-x-mark { 433 | 0% { 434 | -webkit-transform: scale(0.4); 435 | transform: scale(0.4); 436 | margin-top: 26px; 437 | opacity: 0; } 438 | 50% { 439 | -webkit-transform: scale(0.4); 440 | transform: scale(0.4); 441 | margin-top: 26px; 442 | opacity: 0; } 443 | 80% { 444 | -webkit-transform: scale(1.15); 445 | transform: scale(1.15); 446 | margin-top: -6px; } 447 | 100% { 448 | -webkit-transform: scale(1); 449 | transform: scale(1); 450 | margin-top: 0; 451 | opacity: 1; } } 452 | 453 | @keyframes animate-x-mark { 454 | 0% { 455 | -webkit-transform: scale(0.4); 456 | transform: scale(0.4); 457 | margin-top: 26px; 458 | opacity: 0; } 459 | 50% { 460 | -webkit-transform: scale(0.4); 461 | transform: scale(0.4); 462 | margin-top: 26px; 463 | opacity: 0; } 464 | 80% { 465 | -webkit-transform: scale(1.15); 466 | transform: scale(1.15); 467 | margin-top: -6px; } 468 | 100% { 469 | -webkit-transform: scale(1); 470 | transform: scale(1); 471 | margin-top: 0; 472 | opacity: 1; } } 473 | 474 | .animate-x-mark { 475 | -webkit-animation: animate-x-mark 0.5s; 476 | animation: animate-x-mark 0.5s; } 477 | 478 | @-webkit-keyframes pulse-warning { 479 | 0% { 480 | border-color: #f8d486; } 481 | 100% { 482 | border-color: #f8bb86; } } 483 | 484 | @keyframes pulse-warning { 485 | 0% { 486 | border-color: #f8d486; } 487 | 100% { 488 | border-color: #f8bb86; } } 489 | 490 | .pulse-warning { 491 | -webkit-animation: pulse-warning 0.75s infinite alternate; 492 | animation: pulse-warning 0.75s infinite alternate; } 493 | 494 | @-webkit-keyframes rotate-loading { 495 | 0% { 496 | -webkit-transform: rotate(0deg); 497 | transform: rotate(0deg); } 498 | 100% { 499 | -webkit-transform: rotate(360deg); 500 | transform: rotate(360deg); } } 501 | 502 | @keyframes rotate-loading { 503 | 0% { 504 | -webkit-transform: rotate(0deg); 505 | transform: rotate(0deg); } 506 | 100% { 507 | -webkit-transform: rotate(360deg); 508 | transform: rotate(360deg); } } 509 | 510 | 511 | .swal2-modal,.swal2-overlay{position:fixed;display:none}.swal2-modal button.styled:focus,.swal2-modal:focus{outline:0}.swal2-overlay{background-color:rgba(0,0,0,.4);left:0;right:0;top:0;bottom:0;z-index:1000}.swal2-modal{background-color:#fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;border-radius:5px;box-sizing:border-box;text-align:center;left:50%;top:50%;margin-top:-200px;max-height:90%;overflow-x:hidden;overflow-y:auto;z-index:2000}.swal2-modal h2,.swal2-modal p{text-align:center;position:relative;margin:0;padding:0}.swal2-modal.loading{overflow-y:hidden}.swal2-modal h2{color:#575757;font-size:30px;font-weight:600;text-transform:none;line-height:60px;display:block}.swal2-modal p{font-size:16px;font-weight:300;float:none;line-height:normal}.swal2-modal hr{height:10px;color:transparent;border:0}.swal2-modal button.styled{color:#fff;border:0;box-shadow:none;font-size:17px;font-weight:500;border-radius:5px;padding:10px 32px;margin:0 5px;cursor:pointer}.swal2-modal button.styled[disabled]{opacity:.4;cursor:no-drop}.swal2-modal button.styled.loading{box-sizing:border-box;border:4px solid transparent;width:40px;height:40px;padding:0;margin:-2px 30px;vertical-align:top;background-color:transparent!important;color:transparent;cursor:default;border-radius:100%;-webkit-animation:rotate-loading 1.5s linear 0s infinite normal;animation:rotate-loading 1.5s linear 0s infinite normal}.swal2-checkbox input,.swal2-checkbox span,.swal2-radio input,.swal2-radio span{vertical-align:middle}.swal2-modal button.styled::-moz-focus-inner{border:0}.swal2-modal .swal2-image{margin:20px auto}.swal2-modal .swal2-close{font-size:36px;line-height:36px;font-family:serif;position:absolute;top:15px;right:24px;cursor:pointer;color:#cfcfcf;-webkit-transition:all .1s ease;transition:all .1s ease}.swal2-icon.swal2-info,.swal2-icon.swal2-question,.swal2-icon.swal2-warning{font-size:60px;line-height:80px;text-align:center}.swal2-modal .swal2-close:hover{color:#d55}.swal2-icon{width:80px;height:80px;border:4px solid grey;border-radius:50%;margin:20px auto 30px;padding:0;position:relative;box-sizing:content-box;cursor:default;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon.swal2-error{border-color:#f27474}.swal2-icon.swal2-error .x-mark{position:relative;display:block}.swal2-icon.swal2-error .line{position:absolute;height:5px;width:47px;background-color:#f27474;display:block;top:37px;border-radius:2px}.swal2-icon.swal2-error .line.left{-webkit-transform:rotate(45deg);transform:rotate(45deg);left:17px}.swal2-icon.swal2-error .line.right{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);right:16px}.swal2-icon.swal2-warning{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;color:#f8bb86;border-color:#f8bb86}.swal2-icon.swal2-info{font-family:"Open Sans",sans-serif;color:#3fc3ee;border-color:#3fc3ee}.swal2-icon.swal2-question{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;color:#c9dae1;border-color:#c9dae1}.swal2-icon.swal2-success{border-color:#a5dc86}.swal2-icon.swal2-success::after,.swal2-icon.swal2-success::before{content:'';position:absolute;width:60px;height:120px;background:#fff}.swal2-icon.swal2-success::before{border-radius:120px 0 0 120px;top:-7px;left:-33px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:60px 60px;transform-origin:60px 60px}.swal2-icon.swal2-success::after{border-radius:0 120px 120px 0;top:-11px;left:30px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:0 60px;transform-origin:0 60px}.swal2-icon.swal2-success .placeholder{width:80px;height:80px;border:4px solid rgba(165,220,134,.2);border-radius:50%;box-sizing:content-box;position:absolute;left:-4px;top:-4px;z-index:2}.swal2-icon.swal2-success .fix{width:7px;height:90px;background-color:#fff;position:absolute;left:28px;top:8px;z-index:1;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal2-icon.swal2-success .line{height:5px;background-color:#a5dc86;display:block;border-radius:2px;position:absolute;z-index:2}.swal2-icon.swal2-success .line.tip{width:25px;left:14px;top:46px;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.swal2-icon.swal2-success .line.long{width:47px;right:8px;top:38px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal2-input,.swal2-textarea{width:100%;box-sizing:border-box;border-radius:3px;border:1px solid #d7d7d7;margin-top:10px;margin-bottom:17px;font-size:18px;box-shadow:inset 0 1px 1px rgba(0,0,0,.06);-webkit-transition:all .3s;transition:all .3s}.swal2-input.error,.swal2-textarea.error{border-color:#f06e57!important}.swal2-input:focus,.swal2-textarea:focus{outline:0;box-shadow:0 0 3px #c4e6f5;border:1px solid #b4dbed}.swal2-input:focus::-moz-placeholder,.swal2-textarea:focus::-moz-placeholder{-webkit-transition:opacity .3s 30ms ease;transition:opacity .3s 30ms ease;opacity:.8}.swal2-input:focus:-ms-input-placeholder,.swal2-textarea:focus:-ms-input-placeholder{-webkit-transition:opacity .3s 30ms ease;transition:opacity .3s 30ms ease;opacity:.8}.swal2-input:focus::-webkit-input-placeholder,.swal2-textarea:focus::-webkit-input-placeholder{-webkit-transition:opacity .3s 30ms ease;transition:opacity .3s 30ms ease;opacity:.8}.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#bdbdbd}.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#bdbdbd}.swal2-input::-webkit-input-placeholder,.swal2-textarea::-webkit-input-placeholder{color:#bdbdbd}.swal2-input{height:43px;padding:0 12px}.swal2-textarea{height:108px;padding:12px}.swal2-select{color:#555;font-size:inherit;margin:20px auto;padding:5px 10px;min-width:40%;max-width:100%}.swal2-radio{border:0;margin:20px auto}.swal2-radio label:not(:first-child){margin-left:20px}.swal2-radio input{margin:0 3px 0 0}.swal2-checkbox{color:#555;margin:20px auto}.swal2-validationerror{background-color:#f1f1f1;margin:0 -20px;overflow:hidden;padding:10px;color:#797979;font-size:16px;font-weight:300}.swal2-validationerror::before{content:"!";display:inline-block;width:24px;height:24px;border-radius:50%;background-color:#ea7d7d;color:#fff;line-height:24px;text-align:center;margin-right:10px}@-webkit-keyframes showSweetAlert{0%{-webkit-transform:scale(.7);transform:scale(.7)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes showSweetAlert{0%{-webkit-transform:scale(.7);transform:scale(.7)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hideSweetAlert{0%{-webkit-transform:scale(1);transform:scale(1)}100%{-webkit-transform:scale(.5);transform:scale(.5)}}@keyframes hideSweetAlert{0%{-webkit-transform:scale(1);transform:scale(1)}100%{-webkit-transform:scale(.5);transform:scale(.5)}}.show-swal2{-webkit-animation:showSweetAlert .3s;animation:showSweetAlert .3s}.show-swal2.no-animation{-webkit-animation:none;animation:none}.hide-swal2{-webkit-animation:hideSweetAlert .2s;animation:hideSweetAlert .2s}.hide-swal2.no-animation{-webkit-animation:none;animation:none}@-webkit-keyframes animate-success-tip{0%,54%{width:0;left:1px;top:19px}70%{width:50px;left:-8px;top:37px}84%{width:17px;left:21px;top:48px}100%{width:25px;left:14px;top:45px}}@keyframes animate-success-tip{0%,54%{width:0;left:1px;top:19px}70%{width:50px;left:-8px;top:37px}84%{width:17px;left:21px;top:48px}100%{width:25px;left:14px;top:45px}}@-webkit-keyframes animate-success-long{0%,65%{width:0;right:46px;top:54px}84%{width:55px;right:0;top:35px}100%{width:47px;right:8px;top:38px}}@keyframes animate-success-long{0%,65%{width:0;right:46px;top:54px}84%{width:55px;right:0;top:35px}100%{width:47px;right:8px;top:38px}}@-webkit-keyframes rotatePlaceholder{0%,5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}100%,12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}@keyframes rotatePlaceholder{0%,5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}100%,12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}.animate-success-tip{-webkit-animation:animate-success-tip .75s;animation:animate-success-tip .75s}.animate-success-long{-webkit-animation:animate-success-long .75s;animation:animate-success-long .75s}.swal2-icon.swal2-success.animate::after{-webkit-animation:rotatePlaceholder 4.25s ease-in;animation:rotatePlaceholder 4.25s ease-in}@-webkit-keyframes animate-error-icon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}100%{-webkit-transform:rotateX(0);transform:rotateX(0);opacity:1}}@keyframes animate-error-icon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}100%{-webkit-transform:rotateX(0);transform:rotateX(0);opacity:1}}.animate-error-icon{-webkit-animation:animate-error-icon .5s;animation:animate-error-icon .5s}@-webkit-keyframes animate-x-mark{0%,50%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}80%{-webkit-transform:scale(1.15);transform:scale(1.15);margin-top:-6px}100%{-webkit-transform:scale(1);transform:scale(1);margin-top:0;opacity:1}}@keyframes animate-x-mark{0%,50%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}80%{-webkit-transform:scale(1.15);transform:scale(1.15);margin-top:-6px}100%{-webkit-transform:scale(1);transform:scale(1);margin-top:0;opacity:1}}.animate-x-mark{-webkit-animation:animate-x-mark .5s;animation:animate-x-mark .5s}@-webkit-keyframes pulse-warning{0%{border-color:#f8d486}100%{border-color:#f8bb86}}@keyframes pulse-warning{0%{border-color:#f8d486}100%{border-color:#f8bb86}}.pulse-warning{-webkit-animation:pulse-warning .75s infinite alternate;animation:pulse-warning .75s infinite alternate}@-webkit-keyframes rotate-loading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate-loading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}} 512 | 513 | -------------------------------------------------------------------------------- /youtube/html/src/fonts/AlternateGothic2.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mxschmitt/YoutubeWebinterface/9cbad879a84c3f6cb76256f28ba7687b1387fc4b/youtube/html/src/fonts/AlternateGothic2.ttf -------------------------------------------------------------------------------- /youtube/html/src/img/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mxschmitt/YoutubeWebinterface/9cbad879a84c3f6cb76256f28ba7687b1387fc4b/youtube/html/src/img/play.png -------------------------------------------------------------------------------- /youtube/html/src/img/sinusbot-quad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mxschmitt/YoutubeWebinterface/9cbad879a84c3f6cb76256f28ba7687b1387fc4b/youtube/html/src/img/sinusbot-quad.png -------------------------------------------------------------------------------- /youtube/html/src/js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.6 (http://getbootstrap.com) 3 | * Copyright 2011-2015 Twitter, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.6",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.6",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.6",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.6",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.6",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.6",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.6",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); -------------------------------------------------------------------------------- /youtube/html/src/js/main.js: -------------------------------------------------------------------------------- 1 | var maxResults = 6; 2 | var nextPageToken, instanceid, ytapikey, InstanceStatus, ytapi_state = 0; 3 | 4 | function tplawesome(e, t) { 5 | var res = e; 6 | for (var n = 0; n < t.length; n++) { 7 | res = res.replace(/\{\{(.*?)\}\}/g, function (e, r) { 8 | return t[n][r]; 9 | }); 10 | } 11 | return res; 12 | } 13 | 14 | function resetVideoHeight() { 15 | $(".video").css("height", $("#results").width() * 9 / 16); 16 | } 17 | 18 | function ytinit() { 19 | if (ytapi_state == 0) { 20 | ytapi_state = 1; // loaded 21 | } 22 | if (typeof ytapikey != 'undefined') { 23 | if (ytapikey.length == 39) { 24 | gapi.client.setApiKey(ytapikey); 25 | gapi.client.load("youtube", "v3", function () { }); 26 | ytapi_state = 2; 27 | ytapikey = ""; 28 | console.log("youtube api enabled."); 29 | } else { 30 | console.log("invalid api key!"); 31 | sweetAlert('Failed...', "Be sure, that your API Key is correct, and you have no Server API Key instead of a Browser Key!", 'error'); 32 | } 33 | } else { 34 | // console.log("no api key set"); 35 | } 36 | } 37 | $(document).ready(function () { 38 | var instanceList = $('#dropdown'); 39 | // Get the list of instances using the currently logged in user account 40 | $.ajax({ 41 | url: '/api/v1/bot/instances', 42 | headers: { 43 | 'Authorization': 'bearer ' + window.localStorage.token 44 | }, 45 | statusCode: { 46 | 401: function () { 47 | swal({ 48 | title: 'Error', 49 | text: "In order for you to access this you have to be logged in.", 50 | type: 'warning', 51 | confirmButtonColor: '#D9230F', 52 | confirmButtonText: 'Webinterface', 53 | closeOnConfirm: false 54 | }).then(function () { 55 | window.location = getRootUrl(); 56 | }); 57 | } 58 | } 59 | }).done(function (data) { 60 | data = data.sort(dynamicSort("name")); 61 | // get instance from localstorage 62 | if (window.localStorage.instanceId != undefined) { 63 | if (window.localStorage.instanceId.length == 36) { 64 | data.forEach(function (instance) { 65 | if (instance.uuid == window.localStorage.instanceId) { 66 | instanceid = instance.uuid; 67 | getConfig(instance.uuid); 68 | $("#dropdb1").html(instance.name ? instance.name : instance.nick); 69 | } 70 | }); 71 | } 72 | } 73 | data.forEach(function (instance) { // go through every instance 74 | // append instance list 75 | $('
  • ').appendTo(instanceList).html('' + (instance.name ? instance.name : instance.nick) + '').click(function () { 76 | window.localStorage.instanceId = instance.uuid; 77 | getConfig(instance.uuid); 78 | instanceid = instance.uuid; 79 | getInstanceStatus(); 80 | }); 81 | }); 82 | getInstanceStatus(); 83 | setInterval(function () { 84 | getInstanceStatus(); 85 | }, 5000); 86 | $('.dropd1 > li > a').click(function () { // apply dropdown selection 87 | $("#dropdb1").html($(this).text() + ' '); 88 | }); 89 | }); 90 | /* infinite scroll */ 91 | $(window).scroll(function () { 92 | if ($(window).scrollTop() == $(document).height() - $(window).height()) { 93 | if (typeof nextPageToken !== 'undefined') { 94 | moreVideos(); 95 | } 96 | } 97 | }); 98 | /* load more button */ 99 | $("#loadmore").click(function () { 100 | if (typeof nextPageToken !== 'undefined') { 101 | moreVideos(); 102 | } 103 | }); 104 | /* search button */ 105 | $("form").on("submit", function (e) { 106 | e.preventDefault(); 107 | if (typeof instanceid != 'undefined') { 108 | if (ytapi_state == 2) { 109 | if ($("#search").val()) { 110 | // prepare the request 111 | var request = gapi.client.youtube.search.list({ 112 | part: "snippet", 113 | type: "video", 114 | q: $("#search").val().replace(" ", "+"), 115 | maxResults: maxResults, 116 | order: "relevance" 117 | }); 118 | // execute the request 119 | request.execute(function (response) { 120 | var result = response.result; 121 | nextPageToken = result.nextPageToken; 122 | $("#results").html(""); 123 | $.each(result.items, function (index, item) { 124 | $.get("src/templates/yt.html", function (data) { 125 | $("#results").append(tplawesome(data, [{ 126 | title: decodeURIComponentSafe(item.snippet.title), 127 | videoid: decodeURIComponentSafe(item.id.videoId), 128 | channelname: decodeURIComponentSafe(item.snippet.channelTitle.substring(0, 40)), 129 | thumbnail: decodeURIComponentSafe(item.snippet.thumbnails.high.url), 130 | channelhref: "//www.youtube.com/channel/" + item.snippet.channelId 131 | }])); 132 | bindThumbEvent(); 133 | }); 134 | }); 135 | resetVideoHeight(); 136 | $("#loadmore").css("display", "block"); 137 | }); 138 | } else { 139 | sweetAlert('Error', "You have to type something in the searchbar", 'error'); 140 | } 141 | } else { 142 | sweetAlert('YouTube Api Error', "Please make sure that you've set a valid api key in the config and enabled the script on the selected instance.", 'error'); 143 | } 144 | } else { 145 | sweetAlert('Error', "Please select an instance before searching", 'error'); 146 | } 147 | }); 148 | $(window).on("resize", resetVideoHeight); 149 | initVolumeBar(); 150 | }); //Document Ready End 151 | /* get config from a instance */ 152 | function getConfig(instance) { 153 | $.ajax({ 154 | url: '/api/v1/bot/i/' + instance + '/event/ytwebconfig', 155 | method: 'POST', 156 | headers: { 157 | 'Content-Type': 'application/json', 158 | 'Authorization': 'bearer ' + window.localStorage.token 159 | }, 160 | data: '{}' 161 | }).done(function (data) { 162 | var css; 163 | if (!data || data.length == 0) { 164 | css = '.play { display: none' + "}\n" + '.download { display: none' + "}\n" + '.enqueue { display: none' + "}\n" + '#spanover5px { display: none' + "}\n"; 165 | console.log("config not set"); 166 | } else { 167 | ytapikey = data[0].data.ytapikey; 168 | if (ytapi_state == 1) { // initialize ytapi if loaded but not already enabled 169 | ytinit(); 170 | } else if (ytapi_state == 2) { 171 | console.log("youtube api already enabled.") 172 | } 173 | css = '.play { display: ' + (data[0].data.play ? 'inline-block' : 'none') + "}\n" + '.download { display: ' + (data[0].data.download ? 'inline-block' : 'none') + "}\n" + '.enqueue { display: ' + (data[0].data.enqueue ? 'inline-block' : 'none') + "}\n"; 174 | } 175 | $("#btn-style").html(css); 176 | }); 177 | } 178 | 179 | function endplay(url) { 180 | if (typeof instanceid !== 'undefined') { 181 | $.ajax({ 182 | url: '/api/v1/bot/i/' + instanceid + '/event/ytplay', 183 | method: 'POST', 184 | headers: { 185 | 'Content-Type': 'application/json', 186 | 'Authorization': 'bearer ' + window.localStorage.token 187 | }, 188 | data: JSON.stringify(url) 189 | }).done(function (data) { 190 | if (data.length == 0) { 191 | enablePlugin(); 192 | return; 193 | } 194 | // The result will be an array with answers from the script 195 | var answerList = $('#answers'); 196 | answerList.html(''); 197 | data.forEach(function (answer) { 198 | $('
  • ').appendTo(answerList).text(answer.script + ' returned ' + JSON.stringify(answer.data)); 199 | }); 200 | if (data[0].data.includes('not enabled')) { 201 | createAlertBox('error', data[0].data); 202 | } else { 203 | createAlertBox('success', data[0].data); 204 | } 205 | }); 206 | } else { 207 | selectInstance(); 208 | } 209 | } 210 | 211 | function endenqueue(url) { 212 | if (typeof instanceid !== 'undefined') { 213 | $.ajax({ 214 | url: '/api/v1/bot/i/' + instanceid + '/event/ytenq', 215 | method: 'POST', 216 | headers: { 217 | 'Content-Type': 'application/json', 218 | 'Authorization': 'bearer ' + window.localStorage.token 219 | }, 220 | data: JSON.stringify(url) 221 | }).done(function (data) { 222 | if (data.length == 0) { 223 | enablePlugin(); 224 | return; 225 | } 226 | // The result will be an array with answers from the script 227 | var answerList = $('#answers'); 228 | answerList.html(''); 229 | data.forEach(function (answer) { 230 | $('
  • ').appendTo(answerList).text(answer.script + ' returned ' + JSON.stringify(answer.data)); 231 | }); 232 | if (data[0].data.includes('not enabled')) { 233 | createAlertBox('error', data[0].data); 234 | } else { 235 | createAlertBox('success', data[0].data); 236 | } 237 | }); 238 | } else { 239 | selectInstance(); 240 | } 241 | } 242 | 243 | function enddownload(url) { 244 | if (typeof instanceid !== 'undefined') { 245 | $.ajax({ 246 | url: '/api/v1/bot/i/' + instanceid + '/event/ytdl', 247 | method: 'POST', 248 | headers: { 249 | 'Content-Type': 'application/json', 250 | 'Authorization': 'bearer ' + window.localStorage.token 251 | }, 252 | data: JSON.stringify(url) 253 | }).done(function (data) { 254 | if (data.length == 0) { 255 | enablePlugin(); 256 | return; 257 | } 258 | // The result will be an array with answers from the script 259 | var answerList = $('#answers') 260 | answerList.html(''); 261 | data.forEach(function (answer) { 262 | $('
  • ').appendTo(answerList).text(answer.script + ' returned ' + JSON.stringify(answer.data)); 263 | }); 264 | if (data[0].data.includes('not enabled')) { 265 | createAlertBox('error', data[0].data); 266 | } else { 267 | createAlertBox('success', data[0].data); 268 | } 269 | }); 270 | } else { 271 | selectInstance(); 272 | } 273 | } 274 | 275 | function getRootUrl() { 276 | return window.location.origin ? window.location.origin + '/' : window.location.protocol + '/' + window.location.host + '/'; 277 | } 278 | 279 | function moreVideos() { 280 | $("#loadmorecss").removeClass("none"); 281 | var request = gapi.client.youtube.search.list({ 282 | part: "snippet", 283 | type: "video", 284 | q: $("#search").val().replace(" ", "+"), 285 | maxResults: maxResults, 286 | pageToken: nextPageToken, 287 | order: "relevance" 288 | }); 289 | // execute the request 290 | request.execute(function (response) { 291 | var result = response.result; 292 | nextPageToken = result.nextPageToken; 293 | $.each(result.items, function (index, item) { 294 | $.get("src/templates/yt.html", function (data) { 295 | $("#results").append(tplawesome(data, [{ 296 | title: decodeURIComponentSafe(item.snippet.title), 297 | videoid: decodeURIComponentSafe(item.id.videoId), 298 | channelname: decodeURIComponentSafe(item.snippet.channelTitle.substring(0, 40)), 299 | thumbnail: decodeURIComponentSafe(item.snippet.thumbnails.high.url), 300 | channelhref: "//www.youtube.com/channel/" + item.snippet.channelId 301 | }])); 302 | bindThumbEvent(); 303 | }); 304 | }); 305 | resetVideoHeight(); 306 | $("#loadmorecss").addClass("none"); 307 | }); 308 | } 309 | 310 | function dynamicSort(property) { 311 | var sortOrder = 1; 312 | if (property[0] === "-") { 313 | sortOrder = -1; 314 | property = property.substr(1); 315 | } 316 | return function (a, b) { 317 | var result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0; 318 | return result * sortOrder; 319 | } 320 | } 321 | 322 | function enablePlugin() { 323 | sweetAlert('Failed...', "Be sure, that you've enabled the script in your Webinterface!", 'error'); 324 | } 325 | 326 | function selectInstance() { 327 | sweetAlert('Failed...', "Be sure, that you select an instance!", 'error'); 328 | } 329 | 330 | function notEnoughPermissions() { 331 | sweetAlert('Failed...', "Be sure, that you have enough permissions to execute that action!", 'error'); 332 | } 333 | 334 | function createAlertBox(type, text) { 335 | // reset classes 336 | $('div > #alertscss').removeClass("alert-success"); 337 | $('div > #alertscss').removeClass("alert-danger"); 338 | $('div > #alertscss').removeClass("alert-warning"); 339 | if (type == 'success') { 340 | $('div > #alertscss').addClass("alert-success"); 341 | $('#alertscss > #title').text("Success!"); 342 | } else if (type == 'error') { 343 | $('div > #alertscss').addClass("alert-danger"); 344 | $('#alertscss > #title').text("Error!"); 345 | } else if (type == 'warning') { 346 | $('div > #alertscss').addClass("alert-warning"); 347 | $('#alertscss > #title').text("Warning!"); 348 | } else { 349 | return false; 350 | } 351 | // add text and animate 352 | $('#alertscss > #text').text(text); 353 | $('#alertscss').fadeIn(400).delay(2000).fadeOut(400); 354 | return true; 355 | } 356 | 357 | function bindThumbEvent() { 358 | // unbind previous event 359 | $('.youtube-thumb, .play-button').unbind('click'); 360 | // load video when clicking on thumbnail 361 | $('.youtube-thumb, .play-button').click(function () { 362 | var parent = $(this).parent().parent(); 363 | var url = '//www.youtube.com/embed/' + parent.data('videoid') + '?autoplay=1&autohide=2&border=0&wmode=opaque&enablejsapi=1&showinfo=0'; 364 | parent.html(''); 365 | }); 366 | var prevHeight = 0; 367 | var prevElement; 368 | var i = 0; 369 | $('.videos > h3').each(function () { 370 | if (i % 2 == 0) { 371 | prevHeight = $(this).innerHeight(); 372 | prevElement = this; 373 | } else { 374 | var currHeight = $(this).innerHeight(); 375 | if (prevHeight > currHeight) { 376 | $(this).innerHeight(prevHeight); 377 | } else if (prevHeight < currHeight) { 378 | $(prevElement).innerHeight(currHeight); 379 | } 380 | } 381 | i++; 382 | }); 383 | } 384 | 385 | function getInstanceStatus() { 386 | if (typeof instanceid != 'undefined') { 387 | $.ajax({ 388 | url: '/api/v1/bot/i/' + instanceid + '/status', 389 | method: 'GET', 390 | headers: { 391 | 'Content-Type': 'application/json', 392 | 'Authorization': 'bearer ' + window.localStorage.token 393 | }, 394 | statusCode: { 395 | 401: function () { 396 | console.log("not enough permissions for getting the status"); 397 | } 398 | } 399 | }).done(function (data) { 400 | InstanceStatus = data; 401 | changeValBtn = document.querySelector('.v-slider'); 402 | inputRange = changeValBtn.parentNode.querySelector('input[type="range"]'); 403 | inputRange.value = data.volume; 404 | inputRange.dispatchEvent(new Event('change')); 405 | if (data.currentTrack != null && typeof data.currentTrack.title != 'undefined') { 406 | $('#v-title').text(data.currentTrack.title ? data.currentTrack.title : ''); 407 | $('#v-artist').text(data.currentTrack.artist ? data.currentTrack.artist : ''); 408 | } else { 409 | $('#v-title').text(''); 410 | $('#v-artist').text(''); 411 | } 412 | if (data.repeat == true) { 413 | $('#v-retweet').addClass('enabled') 414 | } else { 415 | $('#v-retweet').removeClass('enabled'); 416 | } 417 | if (data.playlistTrack == -1) { 418 | $('#v-random').addClass('enabled') 419 | } else { 420 | if (data.shuffle == true) { 421 | nbr = 0; 422 | $('#v-random').addClass('enabled') 423 | } else { 424 | nbr = 1; 425 | $('#v-random').removeClass('enabled') 426 | } 427 | } 428 | if (data.playing == true) { 429 | $('#va-play').removeClass("glyphicon-play").addClass("glyphicon-stop"); 430 | } else { 431 | $('#va-play').removeClass("glyphicon-stop").addClass("glyphicon-play"); 432 | } 433 | }); 434 | } 435 | } 436 | 437 | function initVolumeBar() { 438 | var selector = '[data-rangeSlider]', 439 | elements = document.querySelectorAll(selector); 440 | rangeSlider.create(elements, { 441 | onInit: function () { }, 442 | onSlideEnd: function (value, percent, position) { 443 | $.ajax({ 444 | url: '/api/v1/bot/i/' + instanceid + '/volume/set/' + value, 445 | method: 'POST', 446 | headers: { 447 | 'Content-Type': 'application/json', 448 | 'Authorization': 'bearer ' + window.localStorage.token 449 | }, 450 | statusCode: { 451 | 401: function () { 452 | notEnoughPermissions(); 453 | }, 454 | 403: function () { 455 | notEnoughPermissions(); 456 | } 457 | } 458 | }).done(function (data) { 459 | getInstanceStatus(); 460 | }); 461 | } 462 | }); 463 | } 464 | // Control events 465 | function vforward() { 466 | $.ajax({ 467 | url: '/api/v1/bot/i/' + instanceid + '/playNext', 468 | method: 'POST', 469 | headers: { 470 | 'Content-Type': 'application/json', 471 | 'Authorization': 'bearer ' + window.localStorage.token 472 | }, 473 | statusCode: { 474 | 401: function () { 475 | notEnoughPermissions(); 476 | }, 477 | 403: function () { 478 | notEnoughPermissions(); 479 | } 480 | } 481 | }); 482 | getInstanceStatus(); 483 | } 484 | 485 | function vbackward() { 486 | $.ajax({ 487 | url: '/api/v1/bot/i/' + instanceid + '/playPrevious', 488 | method: 'POST', 489 | headers: { 490 | 'Content-Type': 'application/json', 491 | 'Authorization': 'bearer ' + window.localStorage.token 492 | }, 493 | statusCode: { 494 | 401: function () { 495 | notEnoughPermissions(); 496 | }, 497 | 403: function () { 498 | notEnoughPermissions(); 499 | } 500 | } 501 | }); 502 | getInstanceStatus(); 503 | } 504 | 505 | function vplay() { 506 | if (InstanceStatus.playing == true) { 507 | $('#va-play').removeClass("glyphicon-stop").addClass("glyphicon-play"); 508 | $.ajax({ 509 | url: '/api/v1/bot/i/' + instanceid + '/pause', 510 | method: 'POST', 511 | headers: { 512 | 'Content-Type': 'application/json', 513 | 'Authorization': 'bearer ' + window.localStorage.token 514 | }, 515 | statusCode: { 516 | 401: function () { 517 | notEnoughPermissions(); 518 | }, 519 | 403: function () { 520 | notEnoughPermissions(); 521 | } 522 | } 523 | }); 524 | } else { 525 | $('#va-play').removeClass("glyphicon-play").addClass("glyphicon-stop"); 526 | $.ajax({ 527 | url: '/api/v1/bot/i/' + instanceid + '/play/byId/' + InstanceStatus.currentTrack.uuid, 528 | method: 'POST', 529 | headers: { 530 | 'Content-Type': 'application/json', 531 | 'Authorization': 'bearer ' + window.localStorage.token 532 | }, 533 | statusCode: { 534 | 401: function () { 535 | notEnoughPermissions(); 536 | }, 537 | 403: function () { 538 | notEnoughPermissions(); 539 | } 540 | } 541 | }); 542 | } 543 | getInstanceStatus(); 544 | } 545 | 546 | function vshuffle() { 547 | if (InstanceStatus.playlistTrack == -1) { 548 | $('#v-random').addClass('enabled') 549 | } else { 550 | if (InstanceStatus.shuffle == true) { 551 | nbr = 0; 552 | $('#v-random').addClass('enabled') 553 | } else { 554 | nbr = 1; 555 | $('#v-random').removeClass('enabled') 556 | } 557 | } 558 | if (InstanceStatus.playlistTrack != -1) { 559 | $.ajax({ 560 | url: '/api/v1/bot/i/' + instanceid + '/shuffle/' + nbr, 561 | method: 'POST', 562 | headers: { 563 | 'Content-Type': 'application/json', 564 | 'Authorization': 'bearer ' + window.localStorage.token 565 | }, 566 | statusCode: { 567 | 401: function () { 568 | notEnoughPermissions(); 569 | }, 570 | 403: function () { 571 | notEnoughPermissions(); 572 | } 573 | } 574 | }); 575 | } else { 576 | swal("Warning...", "Shuffle cannot be deactivated if no playlist is active.", "warning") 577 | } 578 | getInstanceStatus(); 579 | } 580 | 581 | function vrepeat() { 582 | if (InstanceStatus.repeat == true) { 583 | nbr = 0; 584 | $('#v-retweet').removeClass('enabled'); 585 | } else { 586 | nbr = 1; 587 | $('#v-retweet').addClass('enabled'); 588 | } 589 | $.ajax({ 590 | url: '/api/v1/bot/i/' + instanceid + '/repeat/' + nbr, 591 | method: 'POST', 592 | headers: { 593 | 'Content-Type': 'application/json', 594 | 'Authorization': 'bearer ' + window.localStorage.token 595 | }, 596 | statusCode: { 597 | 401: function () { 598 | notEnoughPermissions(); 599 | }, 600 | 403: function () { 601 | notEnoughPermissions(); 602 | } 603 | } 604 | }); 605 | getInstanceStatus(); 606 | } 607 | 608 | function decodeURIComponentSafe(uri) { 609 | var out = new String(), 610 | arr = uri.split(/(%(?:d0|d1)%.{2})/), 611 | i = 0, 612 | l, 613 | x; 614 | for (l = arr.length; i < l; i++) { 615 | try { 616 | x = decodeURIComponent(arr[i]); 617 | } catch (err) { 618 | x = arr[i]; 619 | } 620 | out += x; 621 | } 622 | return out; 623 | } 624 | -------------------------------------------------------------------------------- /youtube/html/src/js/rangeSlider.min.js: -------------------------------------------------------------------------------- 1 | !function(t){"use strict";"function"==typeof define&&define.amd?define([],t):"object"==typeof module&&null!==module&&module.exports?module.exports=t():window.rangeSlider=t()}(function(){"use strict";function t(){var t=document.createElement("input");return t.setAttribute("type","range"),"text"!==t.type}function e(t,e){var i=Array.prototype.slice.call(arguments,2);return setTimeout(function(){return t.apply(null,i)},e)}function i(t,e){return e=e||100,function(){if(!t.debouncing){var i=Array.prototype.slice.apply(arguments);t.lastReturnVal=t.apply(window,i),t.debouncing=!0}return clearTimeout(t.debounceTimeout),t.debounceTimeout=setTimeout(function(){t.debouncing=!1},e),t.lastReturnVal}}function n(t){return!(0!==t.offsetWidth&&0!==t.offsetHeight&&t.open!==!1)}function s(t){for(var e=[],i=t.parentNode;n(i);)e.push(i),i=i.parentNode;return e}function o(t,e){function i(t){"undefined"!=typeof t.open&&(t.open=t.open?!1:!0)}var n=s(t),o=n.length,r=[],h=t[e];if(o){for(var a=0;o>a;a++)r[a]=n[a].style.display,n[a].style.display="block",n[a].style.height="0",n[a].style.overflow="hidden",n[a].style.visibility="hidden",i(n[a]);h=t[e];for(var l=0;o>l;l++)i(n[l]),n[l].style.display=r[l],n[l].style.height="",n[l].style.overflow="",n[l].style.visibility=""}return h}function r(t){return t===""+t}function h(t){return null!==t&&void 0!==t&&(r(t)&&isFinite(parseFloat(t))||isFinite(t))}function a(){if(!arguments.length)return null;for(var t=0,e=arguments.length;e>t;t++)if(h(arguments[t]))return arguments[t]}function l(t){return"[object Object]"===Object.prototype.toString.call(t)}function u(t,e){var i,n={};for(i in t)n[i]=t[i];for(i in e)n[i]=e[i];return n}function d(t,e){for(var i in e)t.style[i]=e[i];return t.style}function p(t,e){v(t,e)||(t.className+=" "+e)}function f(t,e){var i=" "+t.className.replace(/[\t\r\n]/g," ")+" ";if(v(t,e)){for(;i.indexOf(" "+e+" ")>=0;)i=i.replace(" "+e+" "," ");t.className=i.replace(/^\s+|\s+$/g,"")}}function c(t,e,i){for(i&&e(t);t.parentNode&&!e(t);)t=t.parentNode;return t}function m(t,e,i){if(!r(e))throw new TypeError("event name must be String");if(!(t instanceof HTMLElement))throw new TypeError("element must be HTMLElement");e=e.trim();var n=document.createEvent("CustomEvent");n.initCustomEvent(e,!1,!1,i),t.dispatchEvent(n)}function v(t,e){return new RegExp(" "+e+" ").test(" "+t.className+" ")}function g(t,e){t.parentNode.insertBefore(e,t.nextSibling)}function b(t,e,i){e.forEach(function(e){t[x]||(t[x]={}),t[x][e]||(t[x][e]=[]),t.addEventListener(e,i,!1),t[x][e].indexOf(i)<0&&t[x][e].push(i)})}function y(t,e,i){e.forEach(function(e){t.removeEventListener(e,i,!1);var n;t[x]&&t[x][e]&&(n=t[x][e].indexOf(i))>-1&&t[x][e].splice(n,1)})}function _(t){function e(t){t===i._startEventListener&&this.el.removeEventListener(this.eventName,t,!1)}if(t[x]){var i=this;for(var n in t[x])t[x][n].forEach(e,{eventName:n,el:t});t[x]={}}}function E(t,e){var i,n,s;return this.element=t,this.options=u(X,e),this.polyfill=this.options.polyfill,this.onInit=this.options.onInit,this.onSlide=this.options.onSlide,this.onSlideStart=this.options.onSlideStart,this.onSlideEnd=this.options.onSlideEnd,this.onSlideEventsCount=-1,this.isInteractsNow=!1,this.needTriggerEvents=!1,!this.polyfill&&L?!1:(this.options.buffer=this.options.buffer||parseFloat(this.element.getAttribute("data-buffer")),this.identifier="js-"+C+"-"+P++,this.min=a(this.options.min,parseFloat(this.element.getAttribute("min")),i=0),this.max=a(this.options.max,parseFloat(this.element.getAttribute("max")),n=S),this.value=a(this.options.value,this.element.value,parseFloat(this.element.value||this.min+(this.max-this.min)/2)),this.step=a(this.options.step,parseFloat(this.element.getAttribute("step"))||(s=1)),this.percent=null,this._updatePercentFromValue(),this.toFixed=this._toFixed(this.step),this.fill=document.createElement("div"),this.fill.className=this.options.fillClass,this.handle=document.createElement("div"),this.handle.className=this.options.handleClass,this.range=document.createElement("div"),this.range.className=this.options.rangeClass,this.range.id=this.identifier,this.range.appendChild(this.handle),this.range.appendChild(this.fill),this.options.bufferClass&&(this.buffer=document.createElement("div"),this.buffer.className=this.options.bufferClass,this.range.appendChild(this.buffer)),h(this.options.value)&&(this._setValue(this.options.value,!0),this.element.value=this.options.value),h(this.options.buffer)&&this.element.setAttribute("data-buffer",this.options.buffer),(h(this.options.min)||i)&&this.element.setAttribute("min",""+this.min),(h(this.options.max)||n)&&this.element.setAttribute("max",""+this.max),(h(this.options.step)||s)&&this.element.setAttribute("step",""+this.step),g(this.element,this.range),d(this.element,{position:"absolute",width:"1px",height:"1px",overflow:"hidden",opacity:"0"}),this._handleDown=this._handleDown.bind(this),this._handleMove=this._handleMove.bind(this),this._handleEnd=this._handleEnd.bind(this),this._startEventListener=this._startEventListener.bind(this),this._changeEventListener=this._changeEventListener.bind(this),this._handleResize=this._handleResize.bind(this),this._init(),window.addEventListener("resize",this._handleResize,!1),b(document,this.options.startEvent,this._startEventListener),void this.element.addEventListener("change",this._changeEventListener,!1))}var x="eventListenerList",w=new RegExp("/[\\n\\t]/","g"),S=100,N=300,F=50,C="rangeSlider",P=0,L=t(),X={polyfill:!0,rangeClass:"rangeSlider",disabledClass:"rangeSlider--disabled",fillClass:"rangeSlider__fill",bufferClass:"rangeSlider__buffer",handleClass:"rangeSlider__handle",startEvent:["mousedown","touchstart","pointerdown"],moveEvent:["mousemove","touchmove","pointermove"],endEvent:["mouseup","touchend","pointerup"],min:null,max:null,step:null,value:null,buffer:null,borderRadius:10};return E.prototype.constructor=E,E.prototype._toFixed=function(t){return(t+"").replace(".","").length-1},E.prototype._init=function(){this.onInit&&"function"==typeof this.onInit&&this.onInit(),this._update()},E.prototype._updatePercentFromValue=function(){this.percent=(this.value-this.min)/(this.max-this.min)},E.prototype._startEventListener=function(t,e){var i=this,n=t.target,s=!1;c(n,function(t){return s=t.id===i.identifier&&!v(t,i.options.disabledClass)},!0),s&&this._handleDown(t,e)},E.prototype._changeEventListener=function(t,e){if(!e||e.origin!==this.identifier){var i=t.target.value,n=this._getPositionFromValue(i);this._setPosition(n)}},E.prototype._update=function(){this.handleWidth=o(this.handle,"offsetWidth"),this.rangeWidth=o(this.range,"offsetWidth"),this.maxHandleX=this.rangeWidth-this.handleWidth,this.grabX=this.handleWidth/2,this.position=this._getPositionFromValue(this.value),this.element.disabled?p(this.range,this.options.disabledClass):f(this.range,this.options.disabledClass),this._setPosition(this.position),this.options.bufferClass&&this.options.buffer&&this._setBufferPosition(this.options.buffer),this._updatePercentFromValue(),m(this.element,"change",{origin:this.identifier})},E.prototype._handleResize=function(){var t=this;return i(function(){e(function(){t._update()},N)},F)()},E.prototype._handleDown=function(t){if(this.isInteractsNow=!0,t.preventDefault(),b(document,this.options.moveEvent,this._handleMove),b(document,this.options.endEvent,this._handleEnd),!((" "+t.target.className+" ").replace(w," ").indexOf(this.options.handleClass)>-1)){var e=this._getRelativePosition(t),i=this.range.getBoundingClientRect().left,n=this._getPositionFromNode(this.handle)-i;this._setPosition(e-this.grabX),e>=n&&et?e:t>i?i:t},E.prototype._setPosition=function(t){var e,i;e=this._getValueFromPosition(this._cap(t,0,this.maxHandleX)),i=this._getPositionFromValue(e),this.fill.style.width=i+this.grabX+"px",this.handle.style.left=i+"px",this._setValue(e),this.position=i,this.value=e,this._updatePercentFromValue(),(this.isInteractsNow||this.needTriggerEventss)&&(this.onSlideStart&&"function"==typeof this.onSlideStart&&0===this.onSlideEventsCount&&this.onSlideStart(this.value,this.percent,this.position),this.onSlide&&"function"==typeof this.onSlide&&this.onSlide(this.value,this.percent,this.position)),this.onSlideEventsCount++},E.prototype._setBufferPosition=function(t){var e,i,n,s=!0;if(isFinite(t))t=parseFloat(t);else{if(!r(t))return void console.warn("New position must be XXpx or XX%");t.indexOf("px")>0&&(s=!1),t=parseFloat(t)}return isNaN(t)?void console.warn("New position is NaN"):this.options.bufferClass?(e=s?t:t/this.rangeWidth*100,0>e&&(e=0),e>100&&(e=100),this.options.buffer=e,i=this.options.borderRadius/this.rangeWidth*100,n=e-i,0>n&&(n=0),this.buffer.style.width=n+"%",this.buffer.style.left=.5*i+"%",void this.element.setAttribute("data-buffer",e)):void console.warn("You disabled buffer, it's className is empty")},E.prototype._getPositionFromNode=function(t){for(var e=0;null!==t;)e+=t.offsetLeft,t=t.offsetParent;return e},E.prototype._getRelativePosition=function(t){var e=this.range.getBoundingClientRect().left,i=0;return"undefined"!=typeof t.pageX?i=t.touches&&t.touches.length?t.touches[0].pageX:t.pageX:"undefined"!=typeof t.originalEvent?"undefined"!=typeof t.originalEvent.clientX?i=t.originalEvent.clientX:t.originalEvent.touches&&t.originalEvent.touches[0]&&"undefined"!=typeof t.originalEvent.touches[0].clientX&&(i=t.originalEvent.touches[0].clientX):t.touches&&t.touches[0]&&"undefined"!=typeof t.touches[0].clientX?i=t.touches[0].clientX:t.currentPoint&&"undefined"!=typeof t.currentPoint.x&&(i=t.currentPoint.x),i-e},E.prototype._getPositionFromValue=function(t){var e,i;return e=(t-this.min)/(this.max-this.min),i=e*this.maxHandleX},E.prototype._getValueFromPosition=function(t){var e,i;return e=t/(this.maxHandleX||1),i=this.step*Math.round(e*(this.max-this.min)/this.step)+this.min,Number(i.toFixed(this.toFixed))},E.prototype._setValue=function(t,e){(t!==this.value||e)&&(this.element.value=t,this.value=t,m(this.element,"input",{origin:this.identifier}))},E.prototype.update=function(t,e){return e&&(this.needTriggerEvents=!0),l(t)&&(h(t.min)&&(this.element.setAttribute("min",""+t.min),this.min=t.min),h(t.max)&&(this.element.setAttribute("max",""+t.max),this.max=t.max),h(t.step)&&(this.element.setAttribute("step",""+t.step),this.step=t.step,this.toFixed=this._toFixed(t.step)),h(t.buffer)&&this._setBufferPosition(t.buffer),h(t.value)&&this._setValue(t.value)),this._update(),this.onSlideEventsCount=0,this.needTriggerEvents=!1,this},E.prototype.destroy=function(){_.call(this,document),window.removeEventListener("resize",this._handleResize,!1),this.element.removeEventListener("change",this._changeEventListener,!1),this.element.style.cssText="",delete this.element[C],this.range&&this.range.parentNode.removeChild(this.range)},E.create=function(t,e){function i(t){var i=t[C];i||(i=new E(t,e),t[C]=i)}t.length?Array.prototype.slice.call(t).forEach(function(t){i(t)}):i(t)},E}); -------------------------------------------------------------------------------- /youtube/html/src/js/sweetalert2.js: -------------------------------------------------------------------------------- 1 | 2 | !function(e,t){"use strict";function s(){if(void 0===arguments[0])return e.console.error("sweetAlert expects at least 1 attribute!"),!1;var s=B({},r);switch(typeof arguments[0]){case"string":s.title=arguments[0],s.text=arguments[1]||"",s.type=arguments[2]||"";break;case"object":s.title=arguments[0].title||r.title,s.text=arguments[0].text||r.text,s.html=arguments[0].html||r.html,s.type=arguments[0].type||r.type,s.animation=void 0!==arguments[0].animation?arguments[0].animation:r.animation,s.customClass=arguments[0].customClass||s.customClass,s.allowOutsideClick=void 0!==arguments[0].allowOutsideClick?arguments[0].allowOutsideClick:r.allowOutsideClick,s.allowEscapeKey=void 0!==arguments[0].allowEscapeKey?arguments[0].allowEscapeKey:r.allowEscapeKey,s.showConfirmButton=void 0!==arguments[0].showConfirmButton?arguments[0].showConfirmButton:r.showConfirmButton,s.showCancelButton=void 0!==arguments[0].showCancelButton?arguments[0].showCancelButton:r.showCancelButton,s.closeOnConfirm=void 0!==arguments[0].closeOnConfirm?arguments[0].closeOnConfirm:r.closeOnConfirm,s.closeOnCancel=void 0!==arguments[0].closeOnCancel?arguments[0].closeOnCancel:r.closeOnCancel,s.timer=parseInt(arguments[0].timer,10)||r.timer,s.width=parseInt(arguments[0].width,10)||r.width,s.padding=parseInt(arguments[0].padding,10)||r.padding,s.background=void 0!==arguments[0].background?arguments[0].background:r.background,s.confirmButtonText=arguments[0].confirmButtonText||r.confirmButtonText,s.confirmButtonColor=arguments[0].confirmButtonColor||r.confirmButtonColor,s.confirmButtonClass=arguments[0].confirmButtonClass||s.confirmButtonClass,s.cancelButtonText=arguments[0].cancelButtonText||r.cancelButtonText,s.cancelButtonColor=arguments[0].cancelButtonColor||r.cancelButtonColor,s.cancelButtonClass=arguments[0].cancelButtonClass||s.cancelButtonClass,s.buttonsStyling=void 0!==arguments[0].buttonsStyling?arguments[0].buttonsStyling:r.buttonsStyling,s.reverseButtons=void 0!==arguments[0].reverseButtons?arguments[0].reverseButtons:r.reverseButtons,s.showCloseButton=void 0!==arguments[0].showCloseButton?arguments[0].showCloseButton:r.showCloseButton,s.imageUrl=arguments[0].imageUrl||r.imageUrl,s.imageWidth=arguments[0].imageWidth||r.imageWidth,s.imageHeight=arguments[0].imageHeight||r.imageHeight,s.imageClass=arguments[0].imageClass||r.imageClass;break;default:return e.console.error('Unexpected type of argument! Expected "string" or "object", got '+typeof arguments[0]),!1}E(s),O(),q();var n=c();return new Promise(function(i){function r(e,t){for(var s=0;s=0;)s=s.replace(" "+t+" "," ");e.className=s.replace(/^\s+|\s+$/g,"")}},f=function(e){var s=t.createElement("div");return s.appendChild(t.createTextNode(e)),s.innerHTML},y=function(e){e.style.opacity="",e.style.display="block"},C=function(e){if(e&&!e.length)return y(e);for(var t=0;tn;n++){var o=parseInt(e.substr(2*n,2),16);o=Math.round(Math.min(Math.max(0,o+o*t),255)).toString(16),s+=("00"+o).substr(o.length)}return s},E=function(s){var n=c();n.style.width=s.width+"px",n.style.padding=s.padding+"px",n.style.marginLeft=-s.width/2+"px",n.style.background=s.background;var o=t.getElementsByTagName("head")[0],l=t.createElement("style");l.type="text/css",l.id=i,l.innerHTML="@media screen and (max-width: "+s.width+"px) {."+e.swalClasses.modal+" {max-width: 100%;left: 0 !important;margin-left: 0 !important;}}",o.appendChild(l);var a=n.querySelector("h2"),r=n.querySelector("."+e.swalClasses.content),u=n.querySelector("button."+e.swalClasses.confirm),d=n.querySelector("button."+e.swalClasses.cancel),y=n.querySelector("."+e.swalClasses.spacer),p=n.querySelector("."+e.swalClasses.close);if(a.innerHTML=f(s.title).split("\n").join("
    "),s.text||s.html){if("object"==typeof s.html)if(r.innerHTML="",0 in s.html)for(var h=0;h in s.html;h++)r.appendChild(s.html[h]);else r.appendChild(s.html);else r.innerHTML=s.html||"

    "+f(s.text.split("\n").join("
    "))+"

    ";C(r)}else g(r);if(s.showCloseButton?C(p):g(p),n.className=e.swalClasses.modal,s.customClass&&m(n,s.customClass),g(n.querySelectorAll("."+e.swalClasses.icon)),s.type){var b=!1;for(var B in e.swalClasses.iconTypes)if(s.type===B){b=!0;break}if(!b)return e.console.error("Unknown alert type: "+s.type),!1;var k=n.querySelector("."+e.swalClasses.icon+"."+e.swalClasses.iconTypes[s.type]);switch(C(k),s.type){case"success":m(k,"animate"),m(k.querySelector(".tip"),"animate-success-tip"),m(k.querySelector(".long"),"animate-success-long");break;case"error":m(k,"animate-error-icon"),m(k.querySelector(".x-mark"),"animate-x-mark");break;case"warning":m(k,"pulse-warning")}}var S=n.querySelector("."+e.swalClasses.image);s.imageUrl?(S.setAttribute("src",s.imageUrl),C(S),s.imageWidth&&S.setAttribute("width",s.imageWidth),s.imageHeight&&S.setAttribute("height",s.imageHeight),s.imageClass&&m(S,s.imageClass)):g(S),s.showCancelButton?d.style.display="inline-block":g(d),s.showConfirmButton?v(u,"display"):g(u),s.showConfirmButton||s.showCancelButton?C(y):g(y),u.innerHTML=f(s.confirmButtonText),d.innerHTML=f(s.cancelButtonText),s.buttonsStyling&&(u.style.backgroundColor=s.confirmButtonColor,d.style.backgroundColor=s.cancelButtonColor),u.className=e.swalClasses.confirm,m(u,s.confirmButtonClass),d.className=e.swalClasses.cancel,m(d,s.cancelButtonClass),s.buttonsStyling?(m(u,"styled"),m(d,"styled")):(w(u,"styled"),w(d,"styled"),u.style.backgroundColor=u.style.borderLeftColor=u.style.borderRightColor="",d.style.backgroundColor=d.style.borderLeftColor=d.style.borderRightColor=""),s.animation===!0?w(n,"no-animation"):m(n,"no-animation")},q=function(){var e=c();b(u(),10),C(e),m(e,"show-sweet-alert"),w(e,"hide-sweet-alert"),n=t.activeElement,m(e,"visible")},O=function(){var e=c();e.style.marginTop=h(c())};e.sweetAlert=e.swal=function(){var t=arguments,n=c();return null===n&&(e.swal.init(),n=c()),d(n,"visible")&&x(),s.apply(this,t)},e.sweetAlert.close=e.swal.close=e.sweetAlert.closeModal=e.swal.closeModal=function(){var t=c();p(u()),p(t),w(t,"showSweetAlert"),m(t,"hideSweetAlert"),w(t,"visible");var s=t.querySelector("."+e.swalClasses.icon+"."+e.swalClasses.iconTypes.success);w(s,"animate"),w(s.querySelector(".tip"),"animate-success-tip"),w(s.querySelector(".long"),"animate-success-long");var n=t.querySelector("."+e.swalClasses.icon+"."+e.swalClasses.iconTypes.error);w(n,"animate-error-icon"),w(n.querySelector(".x-mark"),"animate-x-mark");var o=t.querySelector("."+e.swalClasses.icon+"."+e.swalClasses.iconTypes.warning);w(o,"pulse-warning"),x()},e.sweetAlert.clickConfirm=e.swal.clickConfirm=function(){var t=c(),s=t.querySelector("button."+e.swalClasses.confirm);s.click()},e.sweetAlert.clickCancel=e.swal.clickCancel=function(){var t=c(),s=t.querySelector("button."+e.swalClasses.cancel);s.click()},e.swal.init=function(){if(!t.getElementsByClassName(e.swalClasses.container).length){var s='
    ',n=t.createElement("div");n.className=e.swalClasses.container,n.innerHTML=s,t.body.appendChild(n)}},e.swal.setDefaults=function(e){if(!e)throw new Error("userParams is required");if("object"!=typeof e)throw new Error("userParams has to be a object");B(r,e)},function(){"complete"===t.readyState||"interactive"===t.readyState&&t.body?e.swal.init():t.addEventListener?t.addEventListener("DOMContentLoaded",function s(){t.removeEventListener("DOMContentLoaded",s,!1),e.swal.init()},!1):t.attachEvent&&t.attachEvent("onreadystatechange",function n(){"complete"===t.readyState&&(t.detachEvent("onreadystatechange",n),e.swal.init())})}()}(window,document); 3 | 4 | !function(e,t){"use strict";function s(){if(void 0===arguments[0])return e.console.error("sweetAlert2 expects at least 1 attribute!"),!1;var s=x({},c);switch(typeof arguments[0]){case"string":s.title=arguments[0],s.text=arguments[1]||"",s.type=arguments[2]||"";break;case"object":s.title=arguments[0].title||c.title,s.text=arguments[0].text||c.text,s.html=arguments[0].html||c.html,s.type=arguments[0].type||c.type,s.animation=void 0!==arguments[0].animation?arguments[0].animation:c.animation,s.customClass=arguments[0].customClass||s.customClass,s.allowOutsideClick=void 0!==arguments[0].allowOutsideClick?arguments[0].allowOutsideClick:c.allowOutsideClick,s.allowEscapeKey=void 0!==arguments[0].allowEscapeKey?arguments[0].allowEscapeKey:c.allowEscapeKey,s.showConfirmButton=void 0!==arguments[0].showConfirmButton?arguments[0].showConfirmButton:c.showConfirmButton,s.showCancelButton=void 0!==arguments[0].showCancelButton?arguments[0].showCancelButton:c.showCancelButton,s.preConfirm=arguments[0].preConfirm||c.preConfirm,s.timer=parseInt(arguments[0].timer,10)||c.timer,s.width=parseInt(arguments[0].width,10)||c.width,s.padding=parseInt(arguments[0].padding,10)||c.padding,s.background=void 0!==arguments[0].background?arguments[0].background:c.background,s.confirmButtonText=arguments[0].confirmButtonText||c.confirmButtonText,s.confirmButtonColor=arguments[0].confirmButtonColor||c.confirmButtonColor,s.confirmButtonClass=arguments[0].confirmButtonClass||s.confirmButtonClass,s.cancelButtonText=arguments[0].cancelButtonText||c.cancelButtonText,s.cancelButtonColor=arguments[0].cancelButtonColor||c.cancelButtonColor,s.cancelButtonClass=arguments[0].cancelButtonClass||s.cancelButtonClass,s.buttonsStyling=void 0!==arguments[0].buttonsStyling?arguments[0].buttonsStyling:c.buttonsStyling,s.reverseButtons=void 0!==arguments[0].reverseButtons?arguments[0].reverseButtons:c.reverseButtons,s.showCloseButton=void 0!==arguments[0].showCloseButton?arguments[0].showCloseButton:c.showCloseButton,s.imageUrl=arguments[0].imageUrl||c.imageUrl,s.imageWidth=arguments[0].imageWidth||c.imageWidth,s.imageHeight=arguments[0].imageHeight||c.imageHeight,s.imageClass=arguments[0].imageClass||c.imageClass,s.input=arguments[0].input||c.input,s.inputPlaceholder=arguments[0].inputPlaceholder||c.inputPlaceholder,s.inputValue=arguments[0].inputValue||c.inputValue,s.inputOptions=arguments[0].inputOptions||c.inputOptions,s.inputClass=arguments[0].inputClass||c.inputClass,s.inputValidator=arguments[0].inputValidator||c.inputValidator,"email"===s.input&&null===s.inputValidator&&(s.inputValidator=function(e){return new Promise(function(t,s){var a=/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/;a.test(e)?t():s("Invalid email address")})});break;default:return e.console.error('Unexpected type of argument! Expected "string" or "object", got '+typeof arguments[0]),!1}T(s),L(),M();var a=u();return new Promise(function(l){function i(e,t){for(var s=0;s=0;)s=s.replace(" "+t+" "," ");e.className=s.replace(/^\s+|\s+$/g,"")}},m=function(e){e.style.opacity="",e.style.display="block"},y=function(e){if(e&&!e.length)return m(e);for(var t=0;ta;a++){var l=parseInt(e.substr(2*a,2),16);l=Math.round(Math.min(Math.max(0,l+l*t),255)).toString(16),s+=("00"+l).substr(l.length)}return s},T=function(s){var a,l=u();l.style.width=s.width+"px",l.style.padding=s.padding+"px",l.style.marginLeft=-s.width/2+"px",l.style.background=s.background;var n=t.getElementsByTagName("head")[0],o=t.createElement("style");o.type="text/css",o.id=i,o.innerHTML="@media screen and (max-width: "+s.width+"px) {."+e.swalClasses.modal+" {max-width: 100%;left: 0 !important;margin-left: 0 !important;}}",n.appendChild(o);var r=l.querySelector("h2"),c=l.querySelector("."+e.swalClasses.content),d=l.querySelector("button."+e.swalClasses.confirm),p=l.querySelector("button."+e.swalClasses.cancel),w=l.querySelector("."+e.swalClasses.spacer),b=l.querySelector("."+e.swalClasses.close);if(r.innerHTML=s.title.split("\n").join("
    "),s.text||s.html){if("object"==typeof s.html)if(c.innerHTML="",0 in s.html)for(a=0;a in s.html;a++)c.appendChild(s.html[a]);else c.appendChild(s.html);else c.innerHTML=s.html||"

    "+s.text.split("\n").join("
    ")+"

    ";y(c)}else v(c);if(s.showCloseButton?y(b):v(b),l.className=e.swalClasses.modal,s.customClass&&f(l,s.customClass),v(l.querySelectorAll("."+e.swalClasses.icon)),s.type){var k=!1;for(var x in e.swalClasses.iconTypes)if(s.type===x){k=!0;break}if(!k)return e.console.error("Unknown alert type: "+s.type),!1;var B=l.querySelector("."+e.swalClasses.icon+"."+e.swalClasses.iconTypes[s.type]);switch(y(B),s.type){case"success":f(B,"animate"),f(B.querySelector(".tip"),"animate-success-tip"),f(B.querySelector(".long"),"animate-success-long");break;case"error":f(B,"animate-error-icon"),f(B.querySelector(".x-mark"),"animate-x-mark");break;case"warning":f(B,"pulse-warning")}}var S=l.querySelector("."+e.swalClasses.image);s.imageUrl?(S.setAttribute("src",s.imageUrl),y(S),s.imageWidth&&S.setAttribute("width",s.imageWidth),s.imageHeight&&S.setAttribute("height",s.imageHeight),s.imageClass&&f(S,s.imageClass)):v(S);var E,q=["input","select","radio","checkbox","textarea"];for(a=0;a',a=t.createElement("div");a.className=e.swalClasses.container,a.innerHTML=s,t.body.appendChild(a);var l=u(),n=l.querySelector("."+e.swalClasses.input),o=l.querySelector("."+e.swalClasses.select),r=l.querySelector("#"+e.swalClasses.checkbox),i=l.querySelector("."+e.swalClasses.textarea);n.oninput=function(){e.swal.resetValidationError()},n.onkeyup=function(t){13===t.keyCode&&e.swal.clickConfirm()},o.onchange=function(){e.swal.resetValidationError()},r.onchange=function(){e.swal.resetValidationError()},i.onchange=function(){e.swal.resetValidationError()}}},e.swal.setDefaults=function(e){if(!e)throw new Error("userParams is required");if("object"!=typeof e)throw new Error("userParams has to be a object");x(c,e)},function(){"complete"===t.readyState||"interactive"===t.readyState&&t.body?e.swal.init():t.addEventListener?t.addEventListener("DOMContentLoaded",function s(){t.removeEventListener("DOMContentLoaded",s,!1),e.swal.init()},!1):t.attachEvent&&t.attachEvent("onreadystatechange",function a(){"complete"===t.readyState&&(t.detachEvent("onreadystatechange",a),e.swal.init())})}()}(window,document); 5 | 6 | -------------------------------------------------------------------------------- /youtube/html/src/templates/yt.html: -------------------------------------------------------------------------------- 1 |
    2 |

    {{title}}

    3 | 4 | 5 | 6 | 7 | 8 | {{channelname}} 9 | 10 |
    11 |
    12 |
    13 | 14 |
    15 |
    16 |
    17 |
    18 |
    --------------------------------------------------------------------------------