<commit_before>/**
 * \file cache_reload.js
 * Plugin that forces a cache reload of boomerang (assuming you have server side support)
 * Copyright (c) 2013, SOASTA, Inc. All rights reserved.
 */


(function() {

BOOMR = BOOMR || {};
BOOMR.plugins = BOOMR.plugins || {};

var impl = {
	url: "",
	initialized: false
};

BOOMR.plugins.CACHE_RELOAD = {
	init: function(config) {
		BOOMR.utils.pluginConfig(impl, config, "CACHE_RELOAD", ["url"]);

		if(this.initalized)
			return this;

		BOOMR.subscribe(
			"page_ready",
			function() {
				if(!impl.url)
					return;
				// we use document and not BOOMR.window.document since
				// we can run inside the boomerang iframe if any
				var i=document.createElement('iframe');
				i.style.display="none";
				i.src=impl.url;
				document.body.appendChild(i);
			},
			null,
			null
		);
		this.initialized = true;

		return this;
	},

	is_complete: function() {
		// we always return true since this plugin never adds anything to the beacon
		return true;
	}<commit_msg>Load cache reload iframe as soon as we have a url<commit_after>/**
 * \file cache_reload.js
 * Plugin that forces a cache reload of boomerang (assuming you have server side support)
 * Copyright (c) 2013, SOASTA, Inc. All rights reserved.
 */


(function() {

BOOMR = BOOMR || {};
BOOMR.plugins = BOOMR.plugins || {};

var impl = {
	url: ""
};

BOOMR.plugins.CACHE_RELOAD = {
	init: function(config) {
		BOOMR.utils.pluginConfig(impl, config, "CACHE_RELOAD", ["url"]);

		if(!impl.url)
			return this;

		// we use document and not BOOMR.window.document since
		// we can run inside the boomerang iframe if any
		var i=document.createElement('iframe');
		i.style.display="none";
		i.src=impl.url;
		document.body.appendChild(i);

		return this;
	},

	is_complete: function() {
		// we always return true since this plugin never adds anything to the beacon
		return true;
	}
{'fraction_non_alphanumeric': 0.13036565977742448, 'fraction_numerical': 0.0042395336512983575, 'mean_word_length': 3.431924882629108, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4857271', 'n_tokens_mistral': 714, 'n_tokens_neox': 624, 'n_words': 187}