Browse Source

cut unfinished feasture - gonna be unsafe for end user

SaltyMonkey 6 years ago
parent
commit
9787fab9c7
3 changed files with 2 additions and 31 deletions
  1. 1 2
      data/migrationData.js
  2. 0 27
      lib/helpers/watchdog.js
  3. 1 2
      settings/settings.json

+ 1 - 2
data/migrationData.js

@@ -11,8 +11,7 @@ const DefaultSettings = {
 	"cleanChat": false,
 	"debugMode": false,
 	"classBasedPresets": true,
-	"enableEvents": false,
-	"trackPresetsChanges": false
+	"enableEvents": false
 };
 
 module.exports = function MigrateSettings(from_ver, to_ver, settings) {

+ 0 - 27
lib/helpers/watchdog.js

@@ -1,27 +0,0 @@
-const fs = require("fs");
-
-class Watchdog {
-	constructor(path, changeCallback, type = ["change"]) {
-		this.fsWatcher = null;
-		let fkYouNodeJs = false;
-		const debounce = 500;
-
-		if (!fs.existsSync(path) || typeof changeCallback !== "function")
-			throw new Error("All shit here fucked");
-
-		// eslint-disable-next-line no-unused-vars
-		const listener = (eventType, filename) => {
-			if (fkYouNodeJs || !type.includes(eventType)) return;
-			fkYouNodeJs = true;
-			setTimeout(() => { fkYouNodeJs = false; }, debounce);
-			setImmediate(() => { changeCallback(); });
-		};
-
-		fs.watch(path, listener);
-	}
-
-	destructor() {
-		if (this.fsWatcher) this.fsWatcher.close();
-	}
-}
-module.exports = Watchdog;

+ 1 - 2
settings/settings.json

@@ -11,7 +11,6 @@
         "cleanChat": false,
         "debugMode": false,
         "classBasedPresets": true,
-        "enableEvents": false,
-        "trackPresetsChanges": false
+        "enableEvents": false
     }
 }