1/*! 2 * jQuery ClassyCountdown 3 * vox.SPACE 4 * 5 * Written by voxspace AT riseup.net 6 * Licensed under the MIT license https://vox.SPACE/LICENSE-MIT 7 * Version 1.1.0 8 * 9 */ 10(function (c) { 11 c.fn.ClassyCountdown = function (k, r) { 12 function l() { 13 e = Math.floor(d / 86400); 14 f = Math.floor(d % 86400 / 3600); 15 g = Math.floor(d % 86400 % 3600 / 60); 16 h = Math.floor(d % 86400 % 3600 % 60 % 60) 17 } 18 function m() { 19 d--; 20 l(); 21 0 >= d && (n || (n = !0, b.onEndCallback()), h = g = f = e = 0); 22 a.find(".ClassyCountdown-days input").val(365 - e).trigger("change"); 23 a.find(".ClassyCountdown-hours input").val(24 - f).trigger("change"); 24 a.find(".ClassyCountdown-minutes input").val(60 - g).trigger("change"); 25 a.find(".ClassyCountdown-seconds input").val(60 - h).trigger("change"); 26 a.find(".ClassyCountdown-days .ClassyCountdown-value > div").html(e); 27 a.find(".ClassyCountdown-hours .ClassyCountdown-value > div").html(f); 28 a.find(".ClassyCountdown-minutes .ClassyCountdown-value > div").html(g); 29 a.find(".ClassyCountdown-seconds .ClassyCountdown-value > div").html(h) 30 } 31 function p() { 32 a.find(".ClassyCountdown-wrapper > div").each(function () { 33 c(this).css("height", c(this).width() + "px") 34 }); 35 b.style.textResponsive && a.find(".ClassyCountdown-value").css("font-size", Math.floor(a.find("> div").eq(0).width() * b.style.textResponsive / 10) + "px"); 36 a.find(".ClassyCountdown-value").each(function () { 37 c(this).css("margin-top", Math.floor(0 - parseInt(c(this).height()) / 2) + "px") 38 }); 39 a.find(".ClassyCountdown-days input").trigger("change"); 40 a.find(".ClassyCountdown-hours input").trigger("change"); 41 a.find(".ClassyCountdown-minutes input").trigger("change"); 42 a.find(".ClassyCountdown-seconds input").trigger("change") 43 } 44 function q(a) { 45 switch (a) { 46 case "flat-colors": 47 return { 48 labels : !0, 49 style : { 50 element : "", 51 textResponsive : .5, 52 days : { 53 gauge : { 54 thickness : .01, 55 bgColor : "rgba(0,0,0,0.05)", 56 fgColor : "#1abc9c" 57 }, 58 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 59 }, 60 hours : { 61 gauge : { 62 thickness : .01, 63 bgColor : "rgba(0,0,0,0.05)", 64 fgColor : "#2980b9" 65 }, 66 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 67 }, 68 minutes : { 69 gauge : { 70 thickness : .01, 71 bgColor : "rgba(0,0,0,0.05)", 72 fgColor : "#8e44ad" 73 }, 74 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 75 }, 76 seconds : { 77 gauge : { 78 thickness : .01, 79 bgColor : "rgba(0,0,0,0.05)", 80 fgColor : "#f39c12" 81 }, 82 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 83 } 84 } 85 }; 86 case "flat-colors-wide": 87 return { 88 labels : !0, 89 style : { 90 element : "", 91 textResponsive : .5, 92 days : { 93 gauge : { 94 thickness : .03, 95 bgColor : "rgba(0,0,0,0.05)", 96 fgColor : "#1abc9c" 97 }, 98 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 99 }, 100 hours : { 101 gauge : { 102 thickness : .03, 103 bgColor : "rgba(0,0,0,0.05)", 104 fgColor : "#2980b9" 105 }, 106 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 107 }, 108 minutes : { 109 gauge : { 110 thickness : .03, 111 bgColor : "rgba(0,0,0,0.05)", 112 fgColor : "#8e44ad" 113 }, 114 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 115 }, 116 seconds : { 117 gauge : { 118 thickness : .03, 119 bgColor : "rgba(0,0,0,0.05)", 120 fgColor : "#f39c12" 121 }, 122 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 123 } 124 } 125 }; 126 case "flat-colors-very-wide": 127 return { 128 labels : !0, 129 style : { 130 element : "", 131 textResponsive : .5, 132 days : { 133 gauge : { 134 thickness : .12, 135 bgColor : "rgba(0,0,0,0.05)", 136 fgColor : "#1abc9c" 137 }, 138 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 139 }, 140 hours : { 141 gauge : { 142 thickness : .12, 143 bgColor : "rgba(0,0,0,0.05)", 144 fgColor : "#2980b9" 145 }, 146 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 147 }, 148 minutes : { 149 gauge : { 150 thickness : .12, 151 bgColor : "rgba(0,0,0,0.05)", 152 fgColor : "#8e44ad" 153 }, 154 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 155 }, 156 seconds : { 157 gauge : { 158 thickness : .12, 159 bgColor : "rgba(0,0,0,0.05)", 160 fgColor : "#f39c12" 161 }, 162 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 163 } 164 } 165 }; 166 case "flat-colors-black": 167 return { 168 labels : !0, 169 style : { 170 element : "", 171 textResponsive : .5, 172 days : { 173 gauge : { 174 thickness : .25, 175 bgColor : "rgba(0,0,0,0.05)", 176 fgColor : "#1abc9c", 177 lineCap : "round" 178 }, 179 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 180 }, 181 hours : { 182 gauge : { 183 thickness : .25, 184 bgColor : "rgba(0,0,0,0.05)", 185 fgColor : "#2980b9", 186 lineCap : "round" 187 }, 188 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 189 }, 190 minutes : { 191 gauge : { 192 thickness : .25, 193 bgColor : "rgba(0,0,0,0.05)", 194 fgColor : "#8e44ad", 195 lineCap : "round" 196 }, 197 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 198 }, 199 seconds : { 200 gauge : { 201 thickness : .25, 202 bgColor : "rgba(0,0,0,0.05)", 203 fgColor : "#f39c12", 204 lineCap : "round" 205 }, 206 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 207 } 208 } 209 }; 210 case "black": 211 return { 212 labels : !0, 213 style : { 214 element : "", 215 textResponsive : .5, 216 days : { 217 gauge : { 218 thickness : .01, 219 bgColor : "rgba(0,0,0,0.05)", 220 fgColor : "#222" 221 }, 222 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 223 }, 224 hours : { 225 gauge : { 226 thickness : .01, 227 bgColor : "rgba(0,0,0,0.05)", 228 fgColor : "#222" 229 }, 230 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 231 }, 232 minutes : { 233 gauge : { 234 thickness : .01, 235 bgColor : "rgba(0,0,0,0.05)", 236 fgColor : "#222" 237 }, 238 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 239 }, 240 seconds : { 241 gauge : { 242 thickness : .01, 243 bgColor : "rgba(0,0,0,0.05)", 244 fgColor : "#222" 245 }, 246 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 247 } 248 } 249 }; 250 case "black-wide": 251 return { 252 labels : !0, 253 style : { 254 element : "", 255 textResponsive : .5, 256 days : { 257 gauge : { 258 thickness : .03, 259 bgColor : "rgba(0,0,0,0.05)", 260 fgColor : "#222" 261 }, 262 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 263 }, 264 hours : { 265 gauge : { 266 thickness : .03, 267 bgColor : "rgba(0,0,0,0.05)", 268 fgColor : "#222" 269 }, 270 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 271 }, 272 minutes : { 273 gauge : { 274 thickness : .03, 275 bgColor : "rgba(0,0,0,0.05)", 276 fgColor : "#222" 277 }, 278 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 279 }, 280 seconds : { 281 gauge : { 282 thickness : .03, 283 bgColor : "rgba(0,0,0,0.05)", 284 fgColor : "#222" 285 }, 286 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 287 } 288 } 289 }; 290 case "black-very-wide": 291 return { 292 labels : !0, 293 style : { 294 element : "", 295 textResponsive : .5, 296 days : { 297 gauge : { 298 thickness : .17, 299 bgColor : "rgba(0,0,0,0.05)", 300 fgColor : "#222" 301 }, 302 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 303 }, 304 hours : { 305 gauge : { 306 thickness : .17, 307 bgColor : "rgba(0,0,0,0.05)", 308 fgColor : "#222" 309 }, 310 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 311 }, 312 minutes : { 313 gauge : { 314 thickness : .17, 315 bgColor : "rgba(0,0,0,0.05)", 316 fgColor : "#222" 317 }, 318 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 319 }, 320 seconds : { 321 gauge : { 322 thickness : .17, 323 bgColor : "rgba(0,0,0,0.05)", 324 fgColor : "#222" 325 }, 326 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 327 } 328 } 329 }; 330 case "black-black": 331 return { 332 labels : !0, 333 style : { 334 element : "", 335 textResponsive : .5, 336 days : { 337 gauge : { 338 thickness : .25, 339 bgColor : "rgba(0,0,0,0.05)", 340 fgColor : "#222", 341 lineCap : "round" 342 }, 343 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 344 }, 345 hours : { 346 gauge : { 347 thickness : .25, 348 bgColor : "rgba(0,0,0,0.05)", 349 fgColor : "#222", 350 lineCap : "round" 351 }, 352 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 353 }, 354 minutes : { 355 gauge : { 356 thickness : .25, 357 bgColor : "rgba(0,0,0,0.05)", 358 fgColor : "#222", 359 lineCap : "round" 360 }, 361 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 362 }, 363 seconds : { 364 gauge : { 365 thickness : .25, 366 bgColor : "rgba(0,0,0,0.05)", 367 fgColor : "#222", 368 lineCap : "round" 369 }, 370 textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" 371 } 372 } 373 }; 374 case "white": 375 return { 376 labels : !0, 377 style : { 378 element : "", 379 textResponsive : .5, 380 days : { 381 gauge : { 382 thickness : .03, 383 bgColor : "rgba(255,255,255,0.05)", 384 fgColor : "#fff" 385 }, 386 textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" 387 }, 388 hours : { 389 gauge : { 390 thickness : .03, 391 bgColor : "rgba(255,255,255,0.05)", 392 fgColor : "#fff" 393 }, 394 textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" 395 }, 396 minutes : { 397 gauge : { 398 thickness : .03, 399 bgColor : "rgba(255,255,255,0.05)", 400 fgColor : "#fff" 401 }, 402 textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" 403 }, 404 seconds : { 405 gauge : { 406 thickness : .03, 407 bgColor : "rgba(255,255,255,0.05)", 408 fgColor : "#fff" 409 }, 410 textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" 411 } 412 } 413 }; 414 case "white-wide": 415 return { 416 labels : !0, 417 style : { 418 element : "", 419 textResponsive : .5, 420 days : { 421 gauge : { 422 thickness : .06, 423 bgColor : "rgba(255,255,255,0.05)", 424 fgColor : "#fff" 425 }, 426 textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" 427 }, 428 hours : { 429 gauge : { 430 thickness : .06, 431 bgColor : "rgba(255,255,255,0.05)", 432 fgColor : "#fff" 433 }, 434 textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" 435 }, 436 minutes : { 437 gauge : { 438 thickness : .06, 439 bgColor : "rgba(255,255,255,0.05)", 440 fgColor : "#fff" 441 }, 442 textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" 443 }, 444 seconds : { 445 gauge : { 446 thickness : .06, 447 bgColor : "rgba(255,255,255,0.05)", 448 fgColor : "#fff" 449 }, 450 textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" 451 } 452 } 453 }; 454 case "white-very-wide": 455 return { 456 labels : !0, 457 style : { 458 element : "", 459 textResponsive : .5, 460 days : { 461 gauge : { 462 thickness : .16, 463 bgColor : "rgba(255,255,255,0.05)", 464 fgColor : "#fff" 465 }, 466 textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" 467 }, 468 hours : { 469 gauge : { 470 thickness : .16, 471 bgColor : "rgba(255,255,255,0.05)", 472 fgColor : "#fff" 473 }, 474 textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" 475 }, 476 minutes : { 477 gauge : { 478 thickness : .16, 479 bgColor : "rgba(255,255,255,0.05)", 480 fgColor : "#fff" 481 }, 482 textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" 483 }, 484 seconds : { 485 gauge : { 486 thickness : .16, 487 bgColor : "rgba(255,255,255,0.05)", 488 fgColor : "#fff" 489 }, 490 textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" 491 } 492 } 493 }; 494 case "white-black": 495 return { 496 labels : !0, 497 style : { 498 element : "", 499 textResponsive : .5, 500 days : { 501 gauge : { 502 thickness : .25, 503 bgColor : "rgba(255,255,255,0.05)", 504 fgColor : "#fff", 505 lineCap : "round" 506 }, 507 textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" 508 }, 509 hours : { 510 gauge : { 511 thickness : .25, 512 bgColor : "rgba(255,255,255,0.05)", 513 fgColor : "#fff", 514 lineCap : "round" 515 }, 516 textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" 517 }, 518 minutes : { 519 gauge : { 520 thickness : .25, 521 bgColor : "rgba(255,255,255,0.05)", 522 fgColor : "#fff", 523 lineCap : "round" 524 }, 525 textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" 526 }, 527 seconds : { 528 gauge : { 529 thickness : .25, 530 bgColor : "rgba(255,255,255,0.05)", 531 fgColor : "#fff", 532 lineCap : "round" 533 }, 534 textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" 535 } 536 } 537 } 538 } 539 } 540 var a = c(this), 541 e, 542 f, 543 g,
544 h, 545 d, 546 n = !1, 547 b = { 548 end : void 0, 549 now : c.now(), 550 labels : !0, 551 labelsOptions : { 552 lang : { 553 days : "Days", 554 hours : "Hours", 555 minutes : "Minutes", 556 seconds : "Seconds" 557 }, 558 style : "font-size: 0.5em;" 559 }, 560 style : { 561 element : "", 562 labels : !1, 563 textResponsive : .5, 564 days : { 565 gauge : { 566 thickness : .02, 567 bgColor : "rgba(0, 0, 0, 0)", 568 fgColor : "rgba(0, 0, 0, 1)", 569 lineCap : "butt" 570 }, 571 textCSS : "" 572 }, 573 hours : { 574 gauge : { 575 thickness : .02, 576 bgColor : "rgba(0, 0, 0, 0)", 577 fgColor : "rgba(0, 0, 0, 1)", 578 lineCap : "butt" 579 }, 580 textCSS : "" 581 }, 582 minutes : { 583 gauge : { 584 thickness : .02, 585 bgColor : "rgba(0, 0, 0, 0)", 586 fgColor : "rgba(0, 0, 0, 1)", 587 lineCap : "butt" 588 }, 589 textCSS : "" 590 }, 591 seconds : { 592 gauge : { 593 thickness : .02, 594 bgColor : "rgba(0, 0, 0, 0)", 595 fgColor : "rgba(0, 0, 0, 1)", 596 lineCap : "butt" 597 }, 598 textCSS : "" 599 } 600 }, 601 onEndCallback : function () {} 602 }; 603 k.theme && (b = c.extend(!0, b, q(k.theme))); 604 b = c.extend(!0, b, k); 605 (function () { 606 a.append('<div class="ClassyCountdown-wrapper"><div class="ClassyCountdown-days"><input type="text" /><span class="ClassyCountdown-value"><div></div><span></span></span></div><div class="ClassyCountdown-hours"><input type="text" /><span class="ClassyCountdown-value"><div></div><span></span></span></div><div class="ClassyCountdown-minutes"><input type="text" /><span class="ClassyCountdown-value"><div></div><span></span></span></div><div class="ClassyCountdown-seconds"><input type="text" /><span class="ClassyCountdown-value"><div></div><span></span></span></div></div>'); 607 a.find(".ClassyCountdown-days input").knob(c.extend({ 608 width : "100%", 609 displayInput : !1, 610 readOnly : !0, 611 max : 365 612 }, b.style.days.gauge)); 613 a.find(".ClassyCountdown-hours input").knob(c.extend({ 614 width : "100%", 615 displayInput : !1, 616 readOnly : !0, 617 max : 24 618 }, b.style.hours.gauge)); 619 a.find(".ClassyCountdown-minutes input").knob(c.extend({ 620 width : "100%", 621 displayInput : !1, 622 readOnly : !0, 623 max : 60 624 }, b.style.minutes.gauge)); 625 a.find(".ClassyCountdown-seconds input").knob(c.extend({ 626 width : "100%", 627 displayInput : !1, 628 readOnly : !0, 629 max : 60 630 }, b.style.seconds.gauge)); 631 a.find(".ClassyCountdown-wrapper > div").attr("style", b.style.element); 632 a.find(".ClassyCountdown-days .ClassyCountdown-value").attr("style", b.style.days.textCSS); 633 a.find(".ClassyCountdown-hours .ClassyCountdown-value").attr("style", b.style.hours.textCSS); 634 a.find(".ClassyCountdown-minutes .ClassyCountdown-value").attr("style", b.style.minutes.textCSS); 635 a.find(".ClassyCountdown-seconds .ClassyCountdown-value").attr("style", b.style.seconds.textCSS); 636 a.find(".ClassyCountdown-value").each(function () { 637 c(this).css("margin-top", Math.floor(0 - parseInt(c(this).height()) / 2) + "px") 638 }); 639 b.labels && (a.find(".ClassyCountdown-days .ClassyCountdown-value > span").html(b.labelsOptions.lang.days), a.find(".ClassyCountdown-hours .ClassyCountdown-value > span").html(b.labelsOptions.lang.hours), a.find(".ClassyCountdown-minutes .ClassyCountdown-value > span").html(b.labelsOptions.lang.minutes), a.find(".ClassyCountdown-seconds .ClassyCountdown-value > span").html(b.labelsOptions.lang.seconds), a.find(".ClassyCountdown-value > span").attr("style", b.labelsOptions.style)); 640 d = b.end - b.now; 641 l() 642 })();
643 m(); 644 setInterval(m, 1E3); 645 (function () { 646 a.find(".ClassyCountdown-wrapper > div").each(function () { 647 c(this).css("height", c(this).width() + "px") 648 }); 649 b.style.textResponsive && (a.find(".ClassyCountdown-value").css("font-size", Math.floor(a.find("> div").eq(0).width() * b.style.textResponsive / 10) + "px"), a.find(".ClassyCountdown-value").each(function () { 650 c(this).css("margin-top", Math.floor(0 - parseInt(c(this).height()) / 2) + "px") 651 })); 652 c(window).trigger("resize"); 653 c(window).resize(c.throttle(50, p)) 654 })() 655 } 656})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.