Skip to content

Commit

Permalink
Fix infinite loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Carnagion committed Feb 12, 2022
1 parent cf0f9e8 commit 5ac9c66
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions settings.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name IsleWard - Addon Settings Framework
// @namespace IsleWard.Addon
// @version 1.1.0
// @version 1.1.1
// @description Provides a framework for addon developers to effortlessly add their addons' settings to IsleWard's options menu.
// @author Carnagion
// @match https://play.isleward.com/
Expand Down Expand Up @@ -359,16 +359,20 @@ function addon()
return `iwd_addon_${name.toLowerCase().replace(/\s/gi, "_")}`;
},
};
addons.register(content);
window.addons.register(content);
}

function calculatePercentage(current, min, max)
{
return (100 * current) / (max - min)
return (100 * current) / (max - min);
}

function cycleUntilMatch(array, target)
{
if (!array.includes(target))
{
return;
}
while (array[0] !== target)
{
array.push(array.shift());
Expand Down

0 comments on commit 5ac9c66

Please sign in to comment.