Some last FappeTyme/WerkTyme tweaks
This commit is contained in:
parent
68bc40cc45
commit
57f7d899ec
@ -9795,7 +9795,7 @@
|
||||
continue;
|
||||
}
|
||||
lc = type.toLowerCase();
|
||||
el = $.el('a', {
|
||||
FappeTyme[lc] = el = $.el('a', {
|
||||
href: 'javascript:;',
|
||||
id: "" + lc + "Tyme",
|
||||
title: "" + type + " Tyme",
|
||||
@ -9809,9 +9809,7 @@
|
||||
name: "" + lc
|
||||
}));
|
||||
Header.addShortcut(el, true);
|
||||
if (Conf[lc]) {
|
||||
FappeTyme.cb.set(lc);
|
||||
}
|
||||
FappeTyme.cb.set(lc);
|
||||
}
|
||||
return Post.callbacks.push({
|
||||
name: 'Fappe Tyme',
|
||||
@ -9826,7 +9824,6 @@
|
||||
},
|
||||
cb: {
|
||||
set: function(type) {
|
||||
FappeTyme[type].checked = Conf[type];
|
||||
return $["" + (Conf[type] ? 'add' : 'rm') + "Class"](doc, "" + type + "Tyme");
|
||||
},
|
||||
toggle: function() {
|
||||
|
||||
@ -9781,7 +9781,7 @@
|
||||
continue;
|
||||
}
|
||||
lc = type.toLowerCase();
|
||||
el = $.el('a', {
|
||||
FappeTyme[lc] = el = $.el('a', {
|
||||
href: 'javascript:;',
|
||||
id: "" + lc + "Tyme",
|
||||
title: "" + type + " Tyme",
|
||||
@ -9795,9 +9795,7 @@
|
||||
name: "" + lc
|
||||
}));
|
||||
Header.addShortcut(el, true);
|
||||
if (Conf[lc]) {
|
||||
FappeTyme.cb.set(lc);
|
||||
}
|
||||
FappeTyme.cb.set(lc);
|
||||
}
|
||||
return Post.callbacks.push({
|
||||
name: 'Fappe Tyme',
|
||||
@ -9812,7 +9810,6 @@
|
||||
},
|
||||
cb: {
|
||||
set: function(type) {
|
||||
FappeTyme[type].checked = Conf[type];
|
||||
return $["" + (Conf[type] ? 'add' : 'rm') + "Class"](doc, "" + type + "Tyme");
|
||||
},
|
||||
toggle: function() {
|
||||
|
||||
@ -4,7 +4,7 @@ FappeTyme =
|
||||
|
||||
for type in ["Fappe", "Werk"] when Conf["#{type} Tyme"]
|
||||
lc = type.toLowerCase()
|
||||
el = $.el 'a',
|
||||
FappeTyme[lc] = el = $.el 'a',
|
||||
href: 'javascript:;'
|
||||
id: "#{lc}Tyme"
|
||||
title: "#{type} Tyme"
|
||||
@ -16,7 +16,7 @@ FappeTyme =
|
||||
|
||||
$.on el, 'click', FappeTyme.cb.toggle.bind {name: "#{lc}"}
|
||||
Header.addShortcut el, true
|
||||
FappeTyme.cb.set lc if Conf[lc]
|
||||
FappeTyme.cb.set lc
|
||||
|
||||
Post.callbacks.push
|
||||
name: 'Fappe Tyme'
|
||||
@ -27,9 +27,7 @@ FappeTyme =
|
||||
$.addClass @nodes.root, "noFile"
|
||||
|
||||
cb:
|
||||
set: (type) ->
|
||||
FappeTyme[type].checked = Conf[type]
|
||||
$["#{if Conf[type] then 'add' else 'rm'}Class"] doc, "#{type}Tyme"
|
||||
set: (type) -> $["#{if Conf[type] then 'add' else 'rm'}Class"] doc, "#{type}Tyme"
|
||||
|
||||
toggle: ->
|
||||
Conf[@name] = !Conf[@name]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user