diff --git a/core/core.php b/core/core.php index dd70d55..4bff866 100644 --- a/core/core.php +++ b/core/core.php @@ -1,6 +1,6 @@ "> - - -
@@ -30,19 +27,28 @@
+
+
+ +
+
+ +
+
-

+

-

+

+

@@ -103,22 +109,26 @@ 15:00 -
+
- -
-
- - + + + + + + + + -
+
@@ -126,36 +136,7 @@
-
- + - - - - - - \ No newline at end of file diff --git a/media/admin.css b/media/admin.css index c950f4c..c4269d9 100644 --- a/media/admin.css +++ b/media/admin.css @@ -12,8 +12,4 @@ body.admin.timer-sync .timer-buttons, body.admin.timer-zero button.pause, body.admin.timer-ready button.pause { visibility: hidden; -} - -body.admin #qrcode { - filter: blur(4px); } \ No newline at end of file diff --git a/media/default.css b/media/default.css index e2c9dbe..7d037fd 100644 --- a/media/default.css +++ b/media/default.css @@ -23,6 +23,11 @@ body { body.user, body .container-timer { background-color: var(--timer-default-color); + width: 100%; +} + +body { + overflow-x: hidden; } body .container-timer { @@ -109,15 +114,12 @@ body .container-title h1 { padding: 0 5px 0 15px; } -body.admin #qrcode { - bottom: 4em; -} #qrcode { position: fixed; margin: 2px; - right: 2px; - + right: 40px; + top: 1px; } body.user #qrcode { @@ -133,11 +135,40 @@ body.user #qrcode { .container-debug { position: fixed; - top: 0.02em; + top: .5em; left: .5em; } #debug { color: #ffffff1a; text-shadow: 1px 1px #00000021; + margin: 0; +} + +.container-toolbar { + position: fixed; + top: .5em; + right: .5em; +} + +i.icon { + background-repeat: no-repeat; + background-size: contain; + width: 24px; + height: 24px; + display: inline-block; + filter: invert(); + opacity: .5; +} + +i.icon:hover { + opacity: 1; +} + +i.icon.full-screen { + background-image: url(fullscreen.png); +} + +i.icon.qrcode { + background-image: url(qrcode.png); } \ No newline at end of file diff --git a/media/fullscreen.png b/media/fullscreen.png new file mode 100644 index 0000000..a33aba1 Binary files /dev/null and b/media/fullscreen.png differ diff --git a/media/obs.css b/media/obs.css index dd9950f..7380d7d 100644 --- a/media/obs.css +++ b/media/obs.css @@ -1,16 +1,17 @@ - -body.obs{ +body.obs { font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; background-color: black; - color:white; + color: white; } -.obs button{ + +.obs button { background-color: rgb(49, 49, 49); - color:white; + color: white; border-radius: 6px; - padding: 6px; + padding: 6px; } -.obs button:hover{ + +.obs button:hover { background-color: rgb(100, 99, 99); } diff --git a/media/qrcode.png b/media/qrcode.png new file mode 100644 index 0000000..5d8bf9f Binary files /dev/null and b/media/qrcode.png differ diff --git a/scripts/classes.js b/scripts/classes.js index 033e11f..8968929 100644 --- a/scripts/classes.js +++ b/scripts/classes.js @@ -9,10 +9,10 @@ var Timer = { endTime: null, preparedTime: null, updateFailed: false, - isSyncing: function() { + isSyncing: function () { return Timer._syncing; }, - setSyncing: function(s) { + setSyncing: function (s) { if (s) { Status.setMessage("Sincronizando..."); } else { @@ -20,15 +20,15 @@ var Timer = { } Timer._syncing = s; }, - prepareTime: function(time_value) { + prepareTime: function (time_value) { Timer.preparedTime = time_value; - Property.set('timer-prepared', (time_value), function(data) { + Property.set('timer-prepared', (time_value), function (data) { document.body.classList.add('timer-ready'); Timer.preparedTime = data['timer-prepared']; Timer.refreshInterface(); }); }, - syncTicTac: function(callback_func) { + syncTicTac: function (callback_func) { clearInterval(Timer._interval1s); clearInterval(Timer._interval1sUpdate); Timer.setSyncing(true); @@ -46,12 +46,12 @@ var Timer = { Timer._diffServer = 0; Timer._diffSum = 0; Timer.setText(''); - Timer._syncTicTacLoop(function() { + Timer._syncTicTacLoop(function () { }); }, - _syncTicTacLoop: function(callback_sync) { - HTTPRequest.getJSON('?timer=1&syncCount=' + Timer._syncCount + "&localTime=" + Timer.localTime, function(data) { + _syncTicTacLoop: function (callback_sync) { + HTTPRequest.getJSON('?timer=1&syncCount=' + Timer._syncCount + "&localTime=" + Timer.localTime, function (data) { var diff = data['diff']; Timer.serverTimeMillis = data['serverTimeMillis']; if (diff != Timer.serverTimeMillis) { @@ -62,12 +62,12 @@ var Timer = { Timer._syncCount++; var nextTimeout = 1000 - diffToZero; console.log("Timer._syncCount,diff, diffToZero, nextTimeout", Timer._syncCount, diff, diffToZero, nextTimeout); - setTimeout(function() { + setTimeout(function () { if (Timer._syncCount >= Timer.pingCount) { var avgDiff = Timer._diffSum / Timer._syncCount; var miliRounded = Math.floor(avgDiff / 1000) * 1000; Timer.localTime += miliRounded; - setTimeout(function() { + setTimeout(function () { Timer.initTicTac(); try { callback_sync(); @@ -81,7 +81,7 @@ var Timer = { }, nextTimeout); }); }, - initTicTac: function() { + initTicTac: function () { console.log('Timer.initTicTac'); Timer.setSyncing(false); delete Timer._syncCount; @@ -89,10 +89,10 @@ var Timer = { delete Timer._diffSum; delete Timer.serverTimeMillis; Timer.localTime = Math.round(Timer.localTime / 1000); - Timer._interval1s = setInterval(function() { + Timer._interval1s = setInterval(function () { Timer.localTime += 1; }, 1000); - Timer._interval1sUpdate = setInterval(function() { + Timer._interval1sUpdate = setInterval(function () { Timer.updateData(); Timer.refreshInterface(); Status.setDebugMessage('L: ' + Timer.localTime + '\nS: ' + Timer.serverTime); @@ -104,8 +104,8 @@ var Timer = { }, 500); Timer.updateData(Timer.refreshInterface); }, - updateData: function(callback) { - Property.getAll(function(data) { + updateData: function (callback) { + Property.getAll(function (data) { if (data) { Timer.preparedTime = data['timer-prepared']; Timer.startTime = data['timer-start']; @@ -122,7 +122,7 @@ var Timer = { if (callback) callback(); }); }, - refreshInterface: function() { + refreshInterface: function () { var seconds = 0; document.body.classList.remove('timer-sync-error'); document.body.classList.remove('timer-ignored'); @@ -206,42 +206,42 @@ var Timer = { } } }, - setContent: function(content) { + setContent: function (content) { document.getElementById('timer').innerHTML = content; }, - setText: function(content) { + setText: function (content) { Timer.setContent(content); document.title = content; }, - getRemainingSeconds: function() { + getRemainingSeconds: function () { seconds = Timer.getRemainingSecondsDiff(); if (seconds < 0) { return 0; } return seconds; }, - getRemainingSecondsDiff: function() { + getRemainingSecondsDiff: function () { return Timer.endTime - Timer.localTime }, - isSemaphored: function() { + isSemaphored: function () { return Timer.startTime > Timer.localTime; }, - isPaused: function() { + isPaused: function () { return Timer.preparedTime && Timer.endTime == 0; }, - isEnding: function() { + isEnding: function () { seconds = Timer.getRemainingSecondsDiff(); return seconds >= 0 && seconds < 10; }, - isRunning: function() { + isRunning: function () { seconds = Timer.getRemainingSeconds(); return seconds > 0 && seconds < 86400; }, - isPrepared: function() { + isPrepared: function () { return Timer.endTime <= 0; }, - start: function() { - Property.set('timer-start', Timer.localTime + 3, function(data) { + start: function () { + Property.set('timer-start', Timer.localTime + 3, function (data) { Timer.preparedTime = data['timer-prepared']; Timer.startTime = data['timer-start']; Timer.endTime = data['timer-end']; @@ -249,7 +249,7 @@ var Timer = { console.log('Timer.start set', data); }); }, - updateButtonStartLabel: function(seconds) { + updateButtonStartLabel: function (seconds) { try { m = Math.floor(seconds / 60); s = seconds % 60; @@ -262,8 +262,8 @@ var Timer = { } var Property = { - getAll: function(callbackdata) { - HTTPRequest.getJSON('?up=1', function(data) { + getAll: function (callbackdata) { + HTTPRequest.getJSON('?up=1', function (data) { if (data) { Status.setMessageError(''); } else { @@ -272,31 +272,31 @@ var Property = { callbackdata(data); }); }, - set: function(prop_name, prop_value, func) { + set: function (prop_name, prop_value, func) { HTTPRequest.getJSON("?set=1&prop_name=" + prop_name + "&prop_value=" + prop_value, func); } } var Status = { - setMessage: function(message) { + setMessage: function (message) { document.getElementById("status").innerHTML = message; }, - setMessageError: function(message) { + setMessageError: function (message) { document.getElementById("status-error").innerHTML = message; }, - setDebugMessage: function(message) { + setDebugMessage: function (message) { document.getElementById("debug").innerHTML = message; } } var HTTPRequest = { - getJSON: function(url, callback_func) { + getJSON: function (url, callback_func) { HTTPRequest._send(url + '&json=1&_=' + (Math.floor(Math.random() * 1000000)) + "&i=" + GLOBAL_ID, callback_func); }, - _send: function(url, callback_func) { + _send: function (url, callback_func) { var xhr = new XMLHttpRequest(); if (callback_func) { - xhr.onreadystatechange = function() { + xhr.onreadystatechange = function () { if (xhr.readyState === 4) { try { var r = JSON.parse(xhr.responseText); diff --git a/scripts/default.js b/scripts/default.js index 671d89e..5f07b24 100644 --- a/scripts/default.js +++ b/scripts/default.js @@ -1,15 +1,41 @@ -var countLostFocus = 0; -function main(){ +var alternarQRCodeStatus = false; + +function main() { document.getElementById("visible").style.display = ''; Status.setMessageError(''); Timer.syncTicTac(); if (window.obsstudio) { document.body.classList.add('obs'); - window.obsstudio.getStatus(function(status) { + window.obsstudio.getStatus(function (status) { document.getElementById('debug').innerHTML = (status); }) } + var qrcode = new QRCode(document.getElementById("qrcode"), { + text: CURRENT_URL, + width: 128, + height: 128, + colorDark: "#000000", + colorLight: "#ffffff", + correctLevel: QRCode.CorrectLevel.H + }); + var qrcode_elem = document.getElementById("qrcode"); + qrcode_elem.title = ""; +} + + +function alternarQRCode() { + var qrcode = document.getElementById('qrcode'); + alternarQRCodeStatus = !alternarQRCodeStatus; + qrcode.style.display = alternarQRCodeStatus ? 'block' : 'none'; +} + +function fullScreen() { + if (document.fullscreenElement != null) { + document.exitFullscreen(); + } else { + document.getElementById('main').requestFullscreen(); + } } window.addEventListener("load", main); \ No newline at end of file diff --git a/scripts/qrcode.js b/scripts/qrcode.js index b9bf726..cf15d28 100644 --- a/scripts/qrcode.js +++ b/scripts/qrcode.js @@ -10,7 +10,7 @@ */ var QRCode; -(function() { +(function () { //--------------------------------------------------------------------- // QRCode for JavaScript // @@ -65,10 +65,10 @@ var QRCode; } QR8bitByte.prototype = { - getLength: function(buffer) { + getLength: function (buffer) { return this.parsedData.length; }, - write: function(buffer) { + write: function (buffer) { for (var i = 0, l = this.parsedData.length; i < l; i++) { buffer.put(this.parsedData[i], 8); } @@ -85,24 +85,24 @@ var QRCode; } QRCodeModel.prototype = { - addData: function(data) { + addData: function (data) { var newData = new QR8bitByte(data); this.dataList.push(newData); this.dataCache = null; }, - isDark: function(row, col) { + isDark: function (row, col) { if (row < 0 || this.moduleCount <= row || col < 0 || this.moduleCount <= col) { throw new Error(row + "," + col); } return this.modules[row][col]; }, - getModuleCount: function() { + getModuleCount: function () { return this.moduleCount; }, - make: function() { + make: function () { this.makeImpl(false, this.getBestMaskPattern()); }, - makeImpl: function(test, maskPattern) { + makeImpl: function (test, maskPattern) { this.moduleCount = this.typeNumber * 4 + 17; this.modules = new Array(this.moduleCount); for (var row = 0; row < this.moduleCount; row++) { @@ -125,7 +125,7 @@ var QRCode; } this.mapData(this.dataCache, maskPattern); }, - setupPositionProbePattern: function(row, col) { + setupPositionProbePattern: function (row, col) { for (var r = -1; r <= 7; r++) { if (row + r <= -1 || this.moduleCount <= row + r) continue; for (var c = -1; c <= 7; c++) { @@ -138,7 +138,7 @@ var QRCode; } } }, - getBestMaskPattern: function() { + getBestMaskPattern: function () { var minLostPoint = 0; var pattern = 0; for (var i = 0; i < 8; i++) { @@ -151,7 +151,7 @@ var QRCode; } return pattern; }, - createMovieClip: function(target_mc, instance_name, depth) { + createMovieClip: function (target_mc, instance_name, depth) { var qr_mc = target_mc.createEmptyMovieClip(instance_name, depth); var cs = 1; this.make(); @@ -172,7 +172,7 @@ var QRCode; } return qr_mc; }, - setupTimingPattern: function() { + setupTimingPattern: function () { for (var r = 8; r < this.moduleCount - 8; r++) { if (this.modules[r][6] != null) { continue; @@ -186,7 +186,7 @@ var QRCode; this.modules[6][c] = (c % 2 == 0); } }, - setupPositionAdjustPattern: function() { + setupPositionAdjustPattern: function () { var pos = QRUtil.getPatternPosition(this.typeNumber); for (var i = 0; i < pos.length; i++) { for (var j = 0; j < pos.length; j++) { @@ -207,7 +207,7 @@ var QRCode; } } }, - setupTypeNumber: function(test) { + setupTypeNumber: function (test) { var bits = QRUtil.getBCHTypeNumber(this.typeNumber); for (var i = 0; i < 18; i++) { var mod = (!test && ((bits >> i) & 1) == 1); @@ -218,7 +218,7 @@ var QRCode; this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = mod; } }, - setupTypeInfo: function(test, maskPattern) { + setupTypeInfo: function (test, maskPattern) { var data = (this.errorCorrectLevel << 3) | maskPattern; var bits = QRUtil.getBCHTypeInfo(data); for (var i = 0; i < 15; i++) { @@ -243,7 +243,7 @@ var QRCode; } this.modules[this.moduleCount - 8][8] = (!test); }, - mapData: function(data, maskPattern) { + mapData: function (data, maskPattern) { var inc = -1; var row = this.moduleCount - 1; var bitIndex = 7; @@ -281,7 +281,7 @@ var QRCode; }; QRCodeModel.PAD0 = 0xEC; QRCodeModel.PAD1 = 0x11; - QRCodeModel.createData = function(typeNumber, errorCorrectLevel, dataList) { + QRCodeModel.createData = function (typeNumber, errorCorrectLevel, dataList) { var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectLevel); var buffer = new QRBitBuffer(); for (var i = 0; i < dataList.length; i++) { @@ -319,7 +319,7 @@ var QRCode; } return QRCodeModel.createBytes(buffer, rsBlocks); }; - QRCodeModel.createBytes = function(buffer, rsBlocks) { + QRCodeModel.createBytes = function (buffer, rsBlocks) { var offset = 0; var maxDcCount = 0; var maxEcCount = 0; @@ -434,21 +434,21 @@ var QRCode; G15: (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0), G18: (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0), G15_MASK: (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1), - getBCHTypeInfo: function(data) { + getBCHTypeInfo: function (data) { var d = data << 10; while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) { d ^= (QRUtil.G15 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15))); } return ((data << 10) | d) ^ QRUtil.G15_MASK; }, - getBCHTypeNumber: function(data) { + getBCHTypeNumber: function (data) { var d = data << 12; while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) { d ^= (QRUtil.G18 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18))); } return (data << 12) | d; }, - getBCHDigit: function(data) { + getBCHDigit: function (data) { var digit = 0; while (data != 0) { digit++; @@ -456,10 +456,10 @@ var QRCode; } return digit; }, - getPatternPosition: function(typeNumber) { + getPatternPosition: function (typeNumber) { return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1]; }, - getMask: function(maskPattern, i, j) { + getMask: function (maskPattern, i, j) { switch (maskPattern) { case QRMaskPattern.PATTERN000: return (i + j) % 2 == 0; @@ -481,14 +481,14 @@ var QRCode; throw new Error("bad maskPattern:" + maskPattern); } }, - getErrorCorrectPolynomial: function(errorCorrectLength) { + getErrorCorrectPolynomial: function (errorCorrectLength) { var a = new QRPolynomial([1], 0); for (var i = 0; i < errorCorrectLength; i++) { a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0)); } return a; }, - getLengthInBits: function(mode, type) { + getLengthInBits: function (mode, type) { if (1 <= type && type < 10) { switch (mode) { case QRMode.MODE_NUMBER: @@ -532,7 +532,7 @@ var QRCode; throw new Error("type:" + type); } }, - getLostPoint: function(qrCode) { + getLostPoint: function (qrCode) { var moduleCount = qrCode.getModuleCount(); var lostPoint = 0; for (var row = 0; row < moduleCount; row++) { @@ -600,13 +600,13 @@ var QRCode; } }; var QRMath = { - glog: function(n) { + glog: function (n) { if (n < 1) { throw new Error("glog(" + n + ")"); } return QRMath.LOG_TABLE[n]; }, - gexp: function(n) { + gexp: function (n) { while (n < 0) { n += 255; } @@ -642,13 +642,13 @@ var QRCode; } } QRPolynomial.prototype = { - get: function(index) { + get: function (index) { return this.num[index]; }, - getLength: function() { + getLength: function () { return this.num.length; }, - multiply: function(e) { + multiply: function (e) { var num = new Array(this.getLength() + e.getLength() - 1); for (var i = 0; i < this.getLength(); i++) { for (var j = 0; j < e.getLength(); j++) { @@ -657,7 +657,7 @@ var QRCode; } return new QRPolynomial(num, 0); }, - mod: function(e) { + mod: function (e) { if (this.getLength() - e.getLength() < 0) { return this; } @@ -839,7 +839,7 @@ var QRCode; [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16] ]; - QRRSBlock.getRSBlocks = function(typeNumber, errorCorrectLevel) { + QRRSBlock.getRSBlocks = function (typeNumber, errorCorrectLevel) { var rsBlock = QRRSBlock.getRsBlockTable(typeNumber, errorCorrectLevel); if (rsBlock == undefined) { throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + errorCorrectLevel); @@ -856,7 +856,7 @@ var QRCode; } return list; }; - QRRSBlock.getRsBlockTable = function(typeNumber, errorCorrectLevel) { + QRRSBlock.getRsBlockTable = function (typeNumber, errorCorrectLevel) { switch (errorCorrectLevel) { case QRErrorCorrectLevel.L: return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0]; @@ -876,19 +876,19 @@ var QRCode; this.length = 0; } QRBitBuffer.prototype = { - get: function(index) { + get: function (index) { var bufIndex = Math.floor(index / 8); return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1) == 1; }, - put: function(num, length) { + put: function (num, length) { for (var i = 0; i < length; i++) { this.putBit(((num >>> (length - i - 1)) & 1) == 1); } }, - getLengthInBits: function() { + getLengthInBits: function () { return this.length; }, - putBit: function(bit) { + putBit: function (bit) { var bufIndex = Math.floor(this.length / 8); if (this.buffer.length <= bufIndex) { this.buffer.push(0); @@ -963,14 +963,14 @@ var QRCode; return android; } - var svgDrawer = (function() { + var svgDrawer = (function () { - var Drawing = function(el, htOption) { + var Drawing = function (el, htOption) { this._el = el; this._htOption = htOption; }; - Drawing.prototype.draw = function(oQRCode) { + Drawing.prototype.draw = function (oQRCode) { var _htOption = this._htOption; var _el = this._el; var nCount = oQRCode.getModuleCount(); @@ -1020,7 +1020,7 @@ var QRCode; } } }; - Drawing.prototype.clear = function() { + Drawing.prototype.clear = function () { while (this._el.hasChildNodes()) this._el.removeChild(this._el.lastChild); }; @@ -1030,8 +1030,8 @@ var QRCode; var useSVG = document.documentElement.tagName.toLowerCase() === "svg"; // Drawing in DOM by using Table tag - var Drawing = useSVG ? svgDrawer : !_isSupportCanvas() ? (function() { - var Drawing = function(el, htOption) { + var Drawing = useSVG ? svgDrawer : !_isSupportCanvas() ? (function () { + var Drawing = function (el, htOption) { this._el = el; this._htOption = htOption; }; @@ -1041,7 +1041,7 @@ var QRCode; * * @param {QRCode} oQRCode */ - Drawing.prototype.draw = function(oQRCode) { + Drawing.prototype.draw = function (oQRCode) { var _htOption = this._htOption; var _el = this._el; var nCount = oQRCode.getModuleCount(); @@ -1075,12 +1075,12 @@ var QRCode; /** * Clear the QRCode */ - Drawing.prototype.clear = function() { + Drawing.prototype.clear = function () { this._el.innerHTML = ''; }; return Drawing; - })() : (function() { // Drawing in Canvas + })() : (function () { // Drawing in Canvas function _onMakeImage() { this._elImage.src = this._elCanvas.toDataURL("image/png"); this._elImage.style.display = "block"; @@ -1092,7 +1092,7 @@ var QRCode; if (this._android && this._android <= 2.1) { var factor = 1 / window.devicePixelRatio; var drawImage = CanvasRenderingContext2D.prototype.drawImage; - CanvasRenderingContext2D.prototype.drawImage = function(image, sx, sy, sw, sh, dx, dy, dw, dh) { + CanvasRenderingContext2D.prototype.drawImage = function (image, sx, sy, sw, sh, dx, dy, dw, dh) { if (("nodeName" in image) && /img/i.test(image.nodeName)) { for (var i = arguments.length - 1; i >= 1; i--) { arguments[i] = arguments[i] * factor; @@ -1123,14 +1123,14 @@ var QRCode; // Check it just once if (self._bSupportDataURI === null) { var el = document.createElement("img"); - var fOnError = function() { + var fOnError = function () { self._bSupportDataURI = false; if (self._fFail) { self._fFail.call(self); } }; - var fOnSuccess = function() { + var fOnSuccess = function () { self._bSupportDataURI = true; if (self._fSuccess) { @@ -1157,7 +1157,7 @@ var QRCode; * @param {HTMLElement} el * @param {Object} htOption QRCode Options */ - var Drawing = function(el, htOption) { + var Drawing = function (el, htOption) { this._bIsPainted = false; this._android = _getAndroid(); @@ -1181,7 +1181,7 @@ var QRCode; * * @param {QRCode} oQRCode */ - Drawing.prototype.draw = function(oQRCode) { + Drawing.prototype.draw = function (oQRCode) { var _elImage = this._elImage; var _oContext = this._oContext; var _htOption = this._htOption; @@ -1228,7 +1228,7 @@ var QRCode; /** * Make the image from Canvas if the browser supports Data URI. */ - Drawing.prototype.makeImage = function() { + Drawing.prototype.makeImage = function () { if (this._bIsPainted) { _safeSetDataURI.call(this, _onMakeImage); } @@ -1239,14 +1239,14 @@ var QRCode; * * @return {Boolean} */ - Drawing.prototype.isPainted = function() { + Drawing.prototype.isPainted = function () { return this._bIsPainted; }; /** * Clear the QRCode */ - Drawing.prototype.clear = function() { + Drawing.prototype.clear = function () { this._oContext.clearRect(0, 0, this._elCanvas.width, this._elCanvas.height); this._bIsPainted = false; }; @@ -1255,7 +1255,7 @@ var QRCode; * @private * @param {Number} nNumber */ - Drawing.prototype.round = function(nNumber) { + Drawing.prototype.round = function (nNumber) { if (!nNumber) { return nNumber; } @@ -1340,7 +1340,7 @@ var QRCode; * @param {String} [vOption.colorLight="#ffffff"] * @param {QRCode.CorrectLevel} [vOption.correctLevel=QRCode.CorrectLevel.H] [L|M|Q|H] */ - QRCode = function(el, vOption) { + QRCode = function (el, vOption) { this._htOption = { width: 256, height: 256, @@ -1386,7 +1386,7 @@ var QRCode; * * @param {String} sText link data */ - QRCode.prototype.makeCode = function(sText) { + QRCode.prototype.makeCode = function (sText) { this._oQRCode = new QRCodeModel(_getTypeNumber(sText, this._htOption.correctLevel), this._htOption.correctLevel); this._oQRCode.addData(sText); this._oQRCode.make(); @@ -1402,7 +1402,7 @@ var QRCode; * * @private */ - QRCode.prototype.makeImage = function() { + QRCode.prototype.makeImage = function () { if (typeof this._oDrawing.makeImage == "function" && (!this._android || this._android >= 3)) { this._oDrawing.makeImage(); } @@ -1411,7 +1411,7 @@ var QRCode; /** * Clear the QRCode */ - QRCode.prototype.clear = function() { + QRCode.prototype.clear = function () { this._oDrawing.clear(); };