Skip to content

Commit

Permalink
Fix autoupdater hook
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahvdAa committed Jul 20, 2023
1 parent 53e2a8f commit 8b4556e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions placenl-userscript-autoupdater.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name PlaceNL Userscript (Autoupdater)
// @namespace https://github.com/PlaceNL/Userscript
// @version 0.0.1
// @version 0.0.2
// @description The easiest way to run our automated placer and keep it up to date, right from your browser
// @author PlaceNL
// @match https://www.reddit.com/r/place/*
Expand Down Expand Up @@ -51,7 +51,7 @@ const UPDATE_CHECK_INTERVAL = 10 * 60 * 1000;
if (scriptData === newScriptData) return;

// Give the userscript some time to display its update message
await window.PLACENL_USERSCRIPT_AUTO_UPDATER.updateHook();
await (typeof unsafeWindow !== 'undefined' ? unsafeWindow : window).PLACENL_USERSCRIPT_AUTO_UPDATER.updateHook();
setTimeout(() => window.location.reload(), 5000);
}
});
Expand Down
1 change: 0 additions & 1 deletion src/CanvasPlacer.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export class CanvasPlacer {
const wrongPixels = getIncorrectPixels(client);
if (wrongPixels.length !== 0) {
while (wrongPixels.length !== 0) {
console.log(wrongPixels)
let pixel = wrongPixels.shift();
const hex = rgbToHex(pixel[2]);
const pi = PALETTE.indexOf(hex.toUpperCase());
Expand Down

0 comments on commit 8b4556e

Please sign in to comment.