Skip to content

Commit

Permalink
Merge pull request #88 from toobeeh/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
toobeeh authored Oct 5, 2024
2 parents 28f195e + efc7b53 commit 335a2a3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
5 changes: 4 additions & 1 deletion content.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@
// Only way to catch errors since: https://github.com/mknichel/javascript-errors#content-scripts. Paste in every script which should trace bugs.
window.onerror = (errorMsg, url, lineNumber, column, errorObj) => { if (!errorMsg) return; errors += "`❌` **" + (new Date()).toTimeString().substr(0, (new Date()).toTimeString().indexOf(" ")) + ": " + errorMsg + "**:\n" + ' Script: ' + url + ' \nLine: ' + lineNumber + ' \nColumn: ' + column + ' \nStackTrace: ' + errorObj + "\n\n"; }

if(localStorage.typoCompatible !== "1") throw new Error("Aborted content because typo not compatible with current skribbl version");
if(localStorage.typoCompatible !== "1") {
new Toast("Typo is not compatible with the current version of Skribbl.io. An update wil follow soon!", 2000);
throw new Error("Aborted content because typo not compatible with current skribbl version");
}

patcher.disconnect(); // stop patcher observing
setDefaults(false); // Set default settings
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "Skribbl Typo",
"description": "The most complete toolbox for skribbl.io with namefinder & Discord integration",
"version": "26.3.4",
"version": "26.3.5",
"author": "tobeh",
"icons": {
"256": "res/icon/256MaxFit.png",
Expand Down
2 changes: 1 addition & 1 deletion patcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ window.onerror = (errorMsg, url, lineNumber, column, errorObj) => { if (!errorMs

const VERSION_ALLOWED = new Promise(async (resolve, reject) => {
try {
const allowedVersions = await(await fetch("https://api.allorigins.win/raw?url=https://pastebin.com/raw/VGVuuaP0")).json();
const allowedVersions = await(await fetch("https://api.allorigins.win/raw?url=https://pastebin.com/raw/VGVuuaP0&d=" + Date.now())).json();
const js = await (await fetch("js/game.js")).text();
const hash = cyrb53(js);
console.log("Current skribbl.io version hash:", hash);
Expand Down
11 changes: 7 additions & 4 deletions skribbltypo.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// @author tobeh#7437
// @description Userscript version of skribbltypo - the most advanced toolbox for skribbl.io
// @icon64 https://rawcdn.githack.com/toobeeh/skribbltypo/master/res/icon/128MaxFit.png
// @version 26.3.4.172812286
// @version 26.3.5.172812337
// @updateURL https://raw.githubusercontent.com/toobeeh/skribbltypo/master/skribbltypo.user.js
// @grant none
// @match https://skribbl.io/*
Expand All @@ -24,7 +24,7 @@ const chrome = {
return "https://rawcdn.githack.com/toobeeh/skribbltypo/master/" + url;
},
getManifest: () => {
return {version: "26.3.4 usrsc"};
return {version: "26.3.5 usrsc"};
},
onMessage: {
addListener: (callback) => {
Expand Down Expand Up @@ -3603,7 +3603,7 @@ window.onerror = (errorMsg, url, lineNumber, column, errorObj) => { if (!errorMs

const VERSION_ALLOWED = new Promise(async (resolve, reject) => {
try {
const allowedVersions = await(await fetch("https://api.allorigins.win/raw?url=https://pastebin.com/raw/VGVuuaP0")).json();
const allowedVersions = await(await fetch("https://api.allorigins.win/raw?url=https://pastebin.com/raw/VGVuuaP0&d=" + Date.now())).json();
const js = await (await fetch("js/game.js")).text();
const hash = cyrb53(js);
console.log("Current skribbl.io version hash:", hash);
Expand Down Expand Up @@ -9311,7 +9311,10 @@ const awards = {
// Only way to catch errors since: https://github.com/mknichel/javascript-errors#content-scripts. Paste in every script which should trace bugs.
window.onerror = (errorMsg, url, lineNumber, column, errorObj) => { if (!errorMsg) return; errors += "`❌` **" + (new Date()).toTimeString().substr(0, (new Date()).toTimeString().indexOf(" ")) + ": " + errorMsg + "**:\n" + ' Script: ' + url + ' \nLine: ' + lineNumber + ' \nColumn: ' + column + ' \nStackTrace: ' + errorObj + "\n\n"; }

if(localStorage.typoCompatible !== "1") throw new Error("Aborted content because typo not compatible with current skribbl version");
if(localStorage.typoCompatible !== "1") {
new Toast("Typo is not compatible with the current version of Skribbl.io. An update wil follow soon!", 2000);
throw new Error("Aborted content because typo not compatible with current skribbl version");
}

patcher.disconnect(); // stop patcher observing
setDefaults(false); // Set default settings
Expand Down

0 comments on commit 335a2a3

Please sign in to comment.