forked from leftypol/leftypol
blur-images.js: trim
This commit is contained in:
parent
8fce7e5d4d
commit
f180940296
1 changed files with 28 additions and 31 deletions
|
@ -10,7 +10,7 @@
|
||||||
* //$config['additional_javascript'][] = 'js/options.js';
|
* //$config['additional_javascript'][] = 'js/options.js';
|
||||||
* //$config['additional_javascript'][] = 'js/style-select.js';
|
* //$config['additional_javascript'][] = 'js/style-select.js';
|
||||||
* //$config['additional_javascript'][] = 'js/options/general.js';
|
* //$config['additional_javascript'][] = 'js/options/general.js';
|
||||||
* $config['additional_javascript'][] = 'js/toggle-images.js';
|
* $config['additional_javascript'][] = 'js/blur-images.js';
|
||||||
*
|
*
|
||||||
* Note: I put it immediately under options/general and make the opacity !important to ensure fast loading time
|
* Note: I put it immediately under options/general and make the opacity !important to ensure fast loading time
|
||||||
* Intended for anti-raid protection
|
* Intended for anti-raid protection
|
||||||
|
@ -60,17 +60,14 @@ $(document).ready(function(){
|
||||||
selector = '#blur-images>input';
|
selector = '#blur-images>input';
|
||||||
event = 'change';
|
event = 'change';
|
||||||
Options.extend_tab("general", "<label id='blur-images'><input type='checkbox' />"+_('Blur images')+"</label>");
|
Options.extend_tab("general", "<label id='blur-images'><input type='checkbox' />"+_('Blur images')+"</label>");
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
selector = '#blur-images a';
|
selector = '#blur-images a';
|
||||||
event = 'click';
|
event = 'click';
|
||||||
$('hr:first').before('<div id="blur-images" style="text-align:right"><a class="unimportant" href="javascript:void(0)">-</a></div>');
|
$('hr:first').before('<div id="blur-images" style="text-align:right"><a class="unimportant" href="javascript:void(0)">-</a></div>');
|
||||||
$('div#blur-images a')
|
$('div#blur-images a').text(blur_images ? _('Unblur images') : _('Blur images'));
|
||||||
.text(blur_images ? _('Unblur images') : _('Blur images'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(selector)
|
$(selector).on(event, function() {
|
||||||
.on(event, function() {
|
|
||||||
blur_images = !blur_images;
|
blur_images = !blur_images;
|
||||||
if (blur_images) {
|
if (blur_images) {
|
||||||
$('img.post-image, .theme-catalog .thread>a>img').each(blurImage);
|
$('img.post-image, .theme-catalog .thread>a>img').each(blurImage);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue