<commit_before>// VERSION 2.4.3
Modules.UTILS = true;
Modules.CLEAN = false;

// PrivateBrowsing - Private browsing mode aid
this.__defineGetter__('PrivateBrowsing', function() { Observers; delete this.PrivateBrowsing; Modules.load('utils/PrivateBrowsing'); return PrivateBrowsing; });

// toCode - allows me to modify a function quickly and safely from within my scripts
this.__defineGetter__('toCode', function() { delete this.toCode; Modules.load('utils/toCode'); return toCode; });

// keydownPanel - Panel elements don't support keyboard navigation by default; this object fixes that.
this.__defineGetter__('keydownPanel', function() { delete this.keydownPanel; Modules.load('utils/keydownPanel'); return keydownPanel; });

// customizing - quick access to whether the window is (or will be) in customize mode or not
this.__defineGetter__('customizing', function() {
	// duh
	if(!window.gCustomizeMode) { return false; }

	if(window.gCustomizeMode._handler.isCustomizing() || window.gCustomizeMode._handler.isEnteringCustomizeMode) { return true; }

	// this means that the window is still opening and the first tab will open customize mode
	if(window.gBrowser.mCurrentBrowser
	&& window.gBrowser.mCurrentBrowser.__SS_restore_data
	&& window.gBrowser.mCurrentBrowser.__SS_restore_data.url == 'about:customizing') {
		return true;
	}

	return false;
});
<commit_msg>bugfix for changes to customize mode in FF47<commit_after>// VERSION 2.4.4
Modules.UTILS = true;
Modules.CLEAN = false;

// PrivateBrowsing - Private browsing mode aid
this.__defineGetter__('PrivateBrowsing', function() { Observers; delete this.PrivateBrowsing; Modules.load('utils/PrivateBrowsing'); return PrivateBrowsing; });

// toCode - allows me to modify a function quickly and safely from within my scripts
this.__defineGetter__('toCode', function() { delete this.toCode; Modules.load('utils/toCode'); return toCode; });

// keydownPanel - Panel elements don't support keyboard navigation by default; this object fixes that.
this.__defineGetter__('keydownPanel', function() { delete this.keydownPanel; Modules.load('utils/keydownPanel'); return keydownPanel; });

// customizing - quick access to whether the window is (or will be) in customize mode or not
if(Services.vc.compare(Services.appinfo.version, "47.0a1") >= 0) {
	this.__defineGetter__('customizing', function() {
		// See bug 1014185
		if(trueAttribute(window.gBrowser.selectedTab, "customizemode")) { return true; }

		// duh
		if(!window.CustomizationHandler) { return false; }

		return window.CustomizationHandler.isCustomizing() || window.CustomizationHandler.isEnteringCustomizeMode;
	});
} else {
	this.__defineGetter__('customizing', function() {
		// duh
		if(!window.gCustomizeMode) { return false; }

		if(window.gCustomizeMode._handler.isCustomizing() || window.gCustomizeMode._handler.isEnteringCustomizeMode) { return true; }

		// this means that the window is still opening and the first tab will open customize mode
		if(window.gBrowser.mCurrentBrowser
		&& window.gBrowser.mCurrentBrowser.__SS_restore_data
		&& window.gBrowser.mCurrentBrowser.__SS_restore_data.url == 'about:customizing') {
			return true;
		}

		return false;
	});
}

{'fraction_non_alphanumeric': 0.11615529117094553, 'fraction_numerical': 0.006261740763932373, 'mean_word_length': 5.3017751479289945, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '657357', 'n_tokens_mistral': 970, 'n_tokens_neox': 939, 'n_words': 249}