Commits

Mathias Panzenböck  committed 2654db3

removed style sheet version handling now that there is a general version handling

  • Participants
  • Parent commits 82816ae

Comments (0)

Files changed (1)

File stickyNote.user.js

 //   Mihai Ghete (Viper)
 
 const BASE_Z_INDEX = 100000;
-const STYLE_VERSION = 1;
-const VERSION       = 100;
+const VERSION      = 100;
 
 const STATE_DISPLAY = 0;
 const STATE_EDIT    = 1;
 }
 
 function saveStylesheet(style) {
-	GM_setValue("stickynote:stylesheet", '/*vers' + STYLE_VERSION + '*/\n' + style);
+	GM_setValue("stickynote:stylesheet", style);
 }
 
 function loadStylesheet() {
 	if (style === undefined) {
 		style = GM_getResourceText('style');
 	}
-	else {
-		// reset style if its to old
-		var match = /\/\*vers(\d+)\*\/\n/.exec(style);
-		var vers = 0;
-
-		if (match == null) {
-			GM_deleteValue("stickynote:stylesheet");
-			style = GM_getResourceText('style');
-		}
-		else {
-			vers = parseInt(match[1]);
-
-			if (vers < STYLE_VERSION) {
-				GM_deleteValue("stickynote:stylesheet");
-				style = GM_getResourceText('style');
-			}
-			else {
-				style = style.substring(match[0].length);
-			}
-		}
-	}
 
 	setStylesheet(style);
 }