mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-02-23 05:49:44 +01:00
Add option for pepe colored quotes
This commit is contained in:
parent
b50ae83ea7
commit
668638525f
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;
|
||||
}
|
||||
|
||||
span.quote-pepe {
|
||||
color: #148800;
|
||||
}
|
||||
|
||||
span.omitted {
|
||||
display: block;
|
||||
margin-top: 1em;
|
||||
|
Loading…
x
Reference in New Issue
Block a user