Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Commit f7d9b51

Browse files
committed
Clean up styleguide.js
1 parent 2e286f2 commit f7d9b51

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

core/styleguide/js/styleguide.js

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -387,18 +387,6 @@
387387

388388
updateSizeReading(size);
389389
}
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-
*/
402390

403391
$('#sg-gen-container').on('touchstart', function(event){});
404392

@@ -450,7 +438,7 @@
450438

451439
var testWidth = screen.width;
452440
if (window.orientation !== undefined) {
453-
testWidth = (window.orientation == 0) ? screen.width : screen.height;
441+
testWidth = (window.orientation === 0) ? screen.width : screen.height;
454442
}
455443
if (($(window).width() == testWidth) && ('ontouchstart' in document.documentElement) && ($(window).width() <= 1024)) {
456444
$("#sg-rightpull-container").width(0);
@@ -494,7 +482,7 @@
494482
history.replaceState({ "pattern": patternName }, null, null);
495483
}
496484

497-
if (document.getElementById("sg-raw") != undefined) {
485+
if (document.getElementById("sg-raw") !== undefined) {
498486
document.getElementById("sg-raw").setAttribute("href",urlHandler.getFileName(patternName));
499487
}
500488

@@ -589,7 +577,7 @@
589577
}
590578
} else if (data.keyPress == 'ctrl+shift+0') {
591579
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])/)) {
593581
var val = mqs[(found[1]-1)];
594582
var type = (val.indexOf("px") !== -1) ? "px" : "em";
595583
val = val.replace(type,"");
@@ -602,7 +590,7 @@
602590
window.addEventListener("message", receiveIframeMessage, false);
603591

604592
$('.sg-tools').click(function() {
605-
if ((qrCodeGenerator.lastGenerated == "") || (qrCodeGenerator.lastGenerated != window.location.search)) {
593+
if ((qrCodeGenerator.lastGenerated === "") || (qrCodeGenerator.lastGenerated !== window.location.search)) {
606594
qrCodeGenerator.getQRCode();
607595
qrCodeGenerator.lastGenerated = window.location.search;
608596
}

0 commit comments

Comments
 (0)