mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-02-24 14:23:23 +01:00
commit
d61641780e
29
js/pepe-colored-quotes.js
Normal file
29
js/pepe-colored-quotes.js
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
* pepe-colored-quotes.js
|
||||||
|
*
|
||||||
|
* Usage:
|
||||||
|
* $config['additional_javascript'][] = 'js/jquery.min.js';
|
||||||
|
* $config['additional_javascript'][] = 'js/pepe-colored-quotes.js';
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
if (window.Options && Options.get_tab('general')) {
|
||||||
|
Options.extend_tab("general", "<label><input type='checkbox' id='pepe-quotes' /> "+_('Pepe colored quotes')+"</label>");
|
||||||
|
|
||||||
|
$('#pepe-quotes').on('change', function() {
|
||||||
|
if (localStorage.pepe_colored_quotes === 'true') {
|
||||||
|
localStorage.pepe_colored_quotes = 'false';
|
||||||
|
} else {
|
||||||
|
localStorage.pepe_colored_quotes = 'true';
|
||||||
|
}
|
||||||
|
$(".quote, .quote-pepe").toggleClass("quote quote-pepe");
|
||||||
|
});
|
||||||
|
|
||||||
|
if (localStorage.pepe_colored_quotes === 'true') {
|
||||||
|
$('#pepe-quotes').attr('checked', 'checked');
|
||||||
|
$(".quote, .quote-pepe").toggleClass("quote quote-pepe");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
@ -312,6 +312,10 @@ span.quote {
|
|||||||
color: #789922;
|
color: #789922;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
span.quote-pepe {
|
||||||
|
color: #148800;
|
||||||
|
}
|
||||||
|
|
||||||
span.omitted {
|
span.omitted {
|
||||||
display: block;
|
display: block;
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user