Disable 4chan's inline extension by default.

This commit is contained in:
Nicolas Stepien 2012-09-10 17:31:12 +02:00
parent e12c9a9f7a
commit 09d8ecb482
3 changed files with 21 additions and 18 deletions

View File

@ -86,6 +86,7 @@
Config = {
main: {
Enhancing: {
'Disable 4chan\'s extension': [true, 'Avoid conflicts between 4chan X and 4chan\'s inline extension.'],
'404 Redirect': [true, 'Redirect dead threads and images'],
'Keybinds': [true, 'Binds actions to keys'],
'Time Formatting': [true, 'Arbitrarily formatted timestamps, using your local time'],
@ -2544,16 +2545,6 @@
Options = {
init: function() {
if (!$.get('firstrun')) {
$.set('firstrun', true);
localStorage.setItem('4chan-settings', '{"disableAll":true}');
$.ready(function() {
if (!Favicon.el) {
Favicon.init();
}
return Options.dialog();
});
}
return $.ready(Options.initReady);
},
initReady: function() {
@ -2569,6 +2560,13 @@
$.on(a, 'click', Options.dialog);
$.prepend($.id(settings), [$.tn('['), a, $.tn('] ')]);
}
if (!$.get('firstrun')) {
$.set('firstrun', true);
if (!Favicon.el) {
Favicon.init();
}
return Options.dialog();
}
},
dialog: function() {
var arr, back, checked, description, dialog, favicon, fileInfo, filter, hiddenNum, hiddenThreads, indicator, indicators, input, key, li, obj, overlay, sauce, time, tr, ul, _i, _len, _ref, _ref1, _ref2;
@ -4982,6 +4980,9 @@
});
return;
}
if (Conf['Disable 4chan\'s extension']) {
localStorage.setItem('4chan-settings', '{"disableAll":true}');
}
Options.init();
if (Conf['Quick Reply'] && Conf['Hide Original Post Form']) {
Main.css += '#postForm { display: none; }';

View File

@ -1,5 +1,6 @@
master
- Mayhem
Add an option to disable 4chan's inline extension. Enabled by default.
Fix compatibility with Scriptish's auto-udpater.
2.34.10

View File

@ -1,6 +1,7 @@
Config =
main:
Enhancing:
'Disable 4chan\'s extension': [true, 'Avoid conflicts between 4chan X and 4chan\'s inline extension.']
'404 Redirect': [true, 'Redirect dead threads and images']
'Keybinds': [true, 'Binds actions to keys']
'Time Formatting': [true, 'Arbitrarily formatted timestamps, using your local time']
@ -1995,13 +1996,6 @@ QR =
Options =
init: ->
unless $.get 'firstrun'
$.set 'firstrun', true
localStorage.setItem '4chan-settings', '{"disableAll":true}'
$.ready ->
# Prevent race conditions
Favicon.init() unless Favicon.el
Options.dialog()
$.ready Options.initReady
initReady: ->
for settings in ['navtopright', 'navbotright']
@ -2011,7 +2005,11 @@ Options =
textContent: '4chan X Settings'
$.on a, 'click', Options.dialog
$.prepend $.id(settings), [$.tn('['), a, $.tn('] ')]
return
unless $.get 'firstrun'
$.set 'firstrun', true
# Prevent race conditions
Favicon.init() unless Favicon.el
Options.dialog()
dialog: ->
dialog = $.el 'div'
@ -3876,6 +3874,9 @@ Main =
location.href = url if url
return
if Conf['Disable 4chan\'s extension']
localStorage.setItem '4chan-settings', '{"disableAll":true}'
Options.init()
if Conf['Quick Reply'] and Conf['Hide Original Post Form']