Oneko: Update Hash
This commit is contained in:
parent
575cb52790
commit
b8261aba5e
1 changed files with 6 additions and 5 deletions
|
|
@ -16,10 +16,11 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { definePluginSettings, migratePluginSettings, Settings } from "@api/Settings";
|
||||
import { definePluginSettings, migratePluginSettings } from "@api/Settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
|
||||
|
||||
const settings = definePluginSettings({
|
||||
speed: {
|
||||
description: "Speed of Da Cat :3",
|
||||
|
|
@ -31,12 +32,12 @@ const settings = definePluginSettings({
|
|||
},
|
||||
onChange: () => {
|
||||
// note: cant call the start() function from here. so i just copy pasted it (This was pointed out in the last commit i made. So this is to just clear stuff up for any future devs that work on this :D )
|
||||
if (Settings.plugins.Oneko.enabled) {
|
||||
if (Vencord.Plugins.isPluginEnabled("Oneko")) {
|
||||
document.getElementById("oneko")?.remove();
|
||||
fetch("https://raw.githubusercontent.com/adryd325/oneko.js/8fa8a1864aa71cd7a794d58bc139e755e96a236c/oneko.js")
|
||||
fetch("https://raw.githubusercontent.com/adryd325/oneko.js/c4ee66353b11a44e4a5b7e914a81f8d33111555e/oneko.js")
|
||||
.then(x => x.text())
|
||||
.then(s => s.replace("const nekoSpeed = 10;", `const nekoSpeed = ${settings.store.speed};`))
|
||||
.then(s => s.replace("./oneko.gif", "https://raw.githubusercontent.com/adryd325/oneko.js/14bab15a755d0e35cd4ae19c931d96d306f99f42/oneko.gif")
|
||||
.then(s => s.replace("./oneko.gif", "https://raw.githubusercontent.com/adryd325/oneko.js/c4ee66353b11a44e4a5b7e914a81f8d33111555e/oneko.gif")
|
||||
.replace("(isReducedMotion)", "(false)"))
|
||||
.then(eval);
|
||||
}
|
||||
|
|
@ -57,7 +58,7 @@ export default definePlugin({
|
|||
fetch("https://raw.githubusercontent.com/adryd325/oneko.js/c4ee66353b11a44e4a5b7e914a81f8d33111555e/oneko.js")
|
||||
.then(x => x.text())
|
||||
.then(s => s.replace("const nekoSpeed = 10;", `const nekoSpeed = ${settings.store.speed};`))
|
||||
.then(s => s.replace("./oneko.gif", "https://raw.githubusercontent.com/adryd325/oneko.js/14bab15a755d0e35cd4ae19c931d96d306f99f42/oneko.gif")
|
||||
.then(s => s.replace("./oneko.gif", "https://raw.githubusercontent.com/adryd325/oneko.js/c4ee66353b11a44e4a5b7e914a81f8d33111555e/oneko.gif")
|
||||
.replace("(isReducedMotion)", "(false)"))
|
||||
.then(eval);
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue