Skip to content

Commit 37476a6

Browse files
committed
update editor
1 parent 606777b commit 37476a6

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

public/app.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/preview.html

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,16 @@
8686
<script>
8787
utils.global(false);
8888

89+
window.printPage = window.print;
90+
window.print = () => {
91+
console.log("warning: print() is no longer alias for text()");
92+
};
93+
window.clear = () => {
94+
console.log("warning: clear() is no longer alias for cls()");
95+
};
96+
// add global FPS to not break old examples
97+
window.FPS = "";
98+
8999
((lc) => {
90100
window.litecanvas = (settings = {}) => {
91101
const loop =
@@ -98,15 +108,6 @@
98108
return lc(settings);
99109
};
100110
})(window.litecanvas);
101-
102-
window.printPage = window.print;
103-
window.print = () => {
104-
console.log("warning: print() is no longer alias for text()");
105-
};
106-
107-
window.clear = () => {
108-
console.log("warning: clear() is no longer alias for cls()");
109-
};
110111
</script>
111112

112113
<script id="code"></script>

public/sw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const cacheName = "luizbills.litecanvas-editor-v1";
2-
const version = "2.67.1";
2+
const version = "2.67.2";
33

44
const precacheResources = [
55
"/",

src/loop-protect.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,10 @@ function randomString(length) {
9393
const result = [];
9494
const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
9595
const charactersLength = characters.length;
96-
let counter = 0;
97-
while (counter < length) {
96+
for (let counter = 0; counter < length; counter++) {
9897
result.push(
9998
characters.charAt(Math.floor(Math.random() * charactersLength))
10099
);
101-
counter += 1;
102100
}
103101
return result.join("");
104102
}

0 commit comments

Comments
 (0)