Small simplification
This commit is contained in:
parent
0935d1c297
commit
5ab152ee34
2
LICENSE
2
LICENSE
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* appchan x - Version 2.1.3 - 2013-06-21
|
||||
* appchan x - Version 2.1.3 - 2013-07-03
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
// ==/UserScript==
|
||||
|
||||
/*
|
||||
* appchan x - Version 2.1.3 - 2013-06-21
|
||||
* appchan x - Version 2.1.3 - 2013-07-03
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||
@ -11378,19 +11378,11 @@
|
||||
cat = _ref[title];
|
||||
for (name in cat) {
|
||||
setting = cat[name];
|
||||
if (setting[2]) {
|
||||
if (setting[2] === 'text') {
|
||||
continue;
|
||||
}
|
||||
hyphenated = ("" + name + " " + Conf[name]).toLowerCase().replace(/^4/, 'four').replace(/\s+/g, '-');
|
||||
$.addClass(doc, hyphenated);
|
||||
} else {
|
||||
if (!Conf[name]) {
|
||||
continue;
|
||||
}
|
||||
hyphenated = ("" + name).toLowerCase().replace(/^4/, 'four').replace(/\s+/g, '-');
|
||||
$.addClass(doc, hyphenated);
|
||||
if (!Conf[name] || setting[2] === 'text') {
|
||||
continue;
|
||||
}
|
||||
hyphenated = ("" + name + (setting[2] ? " " + Conf[name] : "")).toLowerCase().replace(/^4/, 'four').replace(/\s+/g, '-');
|
||||
$.addClass(doc, hyphenated);
|
||||
}
|
||||
}
|
||||
MascotTools.init();
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// Generated by CoffeeScript
|
||||
/*
|
||||
* appchan x - Version 2.1.3 - 2013-06-21
|
||||
* appchan x - Version 2.1.3 - 2013-07-03
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||
@ -11367,19 +11367,11 @@
|
||||
cat = _ref[title];
|
||||
for (name in cat) {
|
||||
setting = cat[name];
|
||||
if (setting[2]) {
|
||||
if (setting[2] === 'text') {
|
||||
continue;
|
||||
}
|
||||
hyphenated = ("" + name + " " + Conf[name]).toLowerCase().replace(/^4/, 'four').replace(/\s+/g, '-');
|
||||
$.addClass(doc, hyphenated);
|
||||
} else {
|
||||
if (!Conf[name]) {
|
||||
continue;
|
||||
}
|
||||
hyphenated = ("" + name).toLowerCase().replace(/^4/, 'four').replace(/\s+/g, '-');
|
||||
$.addClass(doc, hyphenated);
|
||||
if (!Conf[name] || setting[2] === 'text') {
|
||||
continue;
|
||||
}
|
||||
hyphenated = ("" + name + (setting[2] ? " " + Conf[name] : "")).toLowerCase().replace(/^4/, 'four').replace(/\s+/g, '-');
|
||||
$.addClass(doc, hyphenated);
|
||||
}
|
||||
}
|
||||
MascotTools.init();
|
||||
|
||||
@ -1,9 +1,3 @@
|
||||
<% if (type === 'userjs') { %>
|
||||
# Opera doesn't support the @match metadata key,
|
||||
# return 4chan X here if we're not on 4chan.
|
||||
return unless /^[a-z]+\.4chan\.org$/.test location.hostname
|
||||
<% } %>
|
||||
|
||||
editTheme = {} # Currently editted theme.
|
||||
editMascot = {} # Which mascot we're editting.
|
||||
userNavigation = {} # ...
|
||||
|
||||
@ -20,14 +20,9 @@ Style =
|
||||
|
||||
for title, cat of Config.style
|
||||
for name, setting of cat
|
||||
if setting[2]
|
||||
continue if setting[2] is 'text'
|
||||
hyphenated = "#{name} #{Conf[name]}".toLowerCase().replace(/^4/, 'four').replace /\s+/g, '-'
|
||||
$.addClass doc, hyphenated
|
||||
else
|
||||
continue unless Conf[name]
|
||||
hyphenated = "#{name}".toLowerCase().replace(/^4/, 'four').replace /\s+/g, '-'
|
||||
$.addClass doc, hyphenated
|
||||
continue if !Conf[name] or setting[2] is 'text'
|
||||
hyphenated = "#{name}#{if setting[2] then " #{Conf[name]}" else ""}".toLowerCase().replace(/^4/, 'four').replace /\s+/g, '-'
|
||||
$.addClass doc, hyphenated
|
||||
|
||||
MascotTools.init()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user