|
387 | 387 |
|
388 | 388 | updateSizeReading(size);
|
389 | 389 | }
|
390 |
| - |
391 |
| - //Detect larger screen and no touch support |
392 |
| - /* |
393 |
| - if('ontouchstart' in document.documentElement && window.matchMedia("(max-width: 700px)").matches) { |
394 |
| - $('body').addClass('no-resize'); |
395 |
| - $('#sg-viewport ').width(sw); |
396 |
| -
|
397 |
| - alert('workit'); |
398 |
| - } else { |
399 |
| - |
400 |
| - } |
401 |
| - */ |
402 | 390 |
|
403 | 391 | $('#sg-gen-container').on('touchstart', function(event){});
|
404 | 392 |
|
|
450 | 438 |
|
451 | 439 | var testWidth = screen.width;
|
452 | 440 | if (window.orientation !== undefined) {
|
453 |
| - testWidth = (window.orientation == 0) ? screen.width : screen.height; |
| 441 | + testWidth = (window.orientation === 0) ? screen.width : screen.height; |
454 | 442 | }
|
455 | 443 | if (($(window).width() == testWidth) && ('ontouchstart' in document.documentElement) && ($(window).width() <= 1024)) {
|
456 | 444 | $("#sg-rightpull-container").width(0);
|
|
494 | 482 | history.replaceState({ "pattern": patternName }, null, null);
|
495 | 483 | }
|
496 | 484 |
|
497 |
| - if (document.getElementById("sg-raw") != undefined) { |
| 485 | + if (document.getElementById("sg-raw") !== undefined) { |
498 | 486 | document.getElementById("sg-raw").setAttribute("href",urlHandler.getFileName(patternName));
|
499 | 487 | }
|
500 | 488 |
|
|
589 | 577 | }
|
590 | 578 | } else if (data.keyPress == 'ctrl+shift+0') {
|
591 | 579 | sizeiframe(320,true);
|
592 |
| - } else if (found = data.keyPress.match(/ctrl\+shift\+([1-9])/)) { |
| 580 | + } else if (found == data.keyPress.match(/ctrl\+shift\+([1-9])/)) { |
593 | 581 | var val = mqs[(found[1]-1)];
|
594 | 582 | var type = (val.indexOf("px") !== -1) ? "px" : "em";
|
595 | 583 | val = val.replace(type,"");
|
|
602 | 590 | window.addEventListener("message", receiveIframeMessage, false);
|
603 | 591 |
|
604 | 592 | $('.sg-tools').click(function() {
|
605 |
| - if ((qrCodeGenerator.lastGenerated == "") || (qrCodeGenerator.lastGenerated != window.location.search)) { |
| 593 | + if ((qrCodeGenerator.lastGenerated === "") || (qrCodeGenerator.lastGenerated !== window.location.search)) { |
606 | 594 | qrCodeGenerator.getQRCode();
|
607 | 595 | qrCodeGenerator.lastGenerated = window.location.search;
|
608 | 596 | }
|
|
0 commit comments