Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up default user tag groups in the default settings. #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions Emp++_Tag_Highlighter07.user.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// ==UserScript==
// @name Emp++ Tag Highlighter 0.7
// @version 0.7.5c
// @version 0.7.6
// @description highlights liked/disliked tags
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_deleteValue
// @require https://code.jquery.com/jquery-1.12.4.min.js
// @match http://*.empornium.me/*
// @match https://*.empornium.me/*
Expand All @@ -24,6 +25,9 @@
// ==/UserScript==

// Changelog:
// Version 0.7.6
// - Set empty user tag groups in default settings.
// - Remove code importing old (<0.4) user tag group settings.
// Version 0.7.5c
// - Fixing some bugs that appear after the cleaning.
// Version 0.7.5b
Expand Down Expand Up @@ -93,6 +97,25 @@ function runScript(){
buttonMaleperfTags : false,
buttonLikesiteTags : false,
buttonDislikedTags : false,

// User tag groups
tags: {
good : [],
loved : [],
performer : [],
loveperf : [],
newperf : [],
amateur : [],
loveamat : [],
maleperf : [],
lovemale : [],
likesite : [],
lovesite : [],
disliked : [],
hated : [],
terrible : [],
useless : [],
},
};

var settings = getSettings();
Expand All @@ -104,29 +127,6 @@ function runScript(){
saveSettings();
//handle upgrade
}

//import tags from pre-v0.4 ETH
if(!settings.tags){
settings.tags = {
good : getValue("good_tags", "").split(' '),
loved : getValue("loved_tags", "").split(' '),
performer : getValue("performer_tags", "").split(' '),
loveperf : getValue("loveperf_tags", "").split(' '),
newperf : getValue("newperf_tags", "").split(' '),
amateur : getValue("amateur_tags", "").split(' '),
loveamat : getValue("loveamat_tags", "").split(' '),
maleperf : getValue("maleperf_tags", "").split(' '),
lovemale : getValue("lovemale_tags", "").split(' '),
likesite : getValue("likesite_tags", "").split(' '),
lovesite : getValue("lovesite_tags", "").split(' '),
disliked : getValue("bad_tags", "").split(' '),
hated : getValue("hated_tags", "").split(' '),
terrible : getValue("terrible_tags", "").split(' '),
useless : getValue("useless_tags", "").split(' ')
};
saveSettings();
}


var configHTML =
"<div id='s-conf-background'>" +
Expand Down