<commit_before>

tinyMCE.importPluginLanguagePack('simplebrowser', 'en');

var TinyMCE_SimpleBrowserPlugin = {
	options : {},
	getInfo : function() {
		return {
			longname : '',
			author : '',
			authorurl : '',
			infourl : '',
			version : ""
		};
	},

	initInstance : function(inst) {
		// You can take out plugin specific parameters
		//alert("Initialization parameter:" + tinyMCE.getParam("template_someparam", false));
		tinyMCE.settings['file_browser_callback'] = "TinyMCE_SimpleBrowserPlugin_browse";
		TinyMCE_SimpleBrowserPlugin.options = {
			width : tinyMCE.getParam("plugin_simplebrowser_width", '800'),
			height : tinyMCE.getParam("plugin_simplebrowser_height", '600'),
			browseimageurl : tinyMCE.getParam("plugin_simplebrowser_browseimageurl", false),
			browselinkurl : tinyMCE.getParam("plugin_simplebrowser_browselinkurl", false),
			browseflashurl : tinyMCE.getParam("plugin_simplebrowser_browseflashurl", false)
		}
	},

	browse : function(field_name, current_url, type, win) {
		switch(type.toLowerCase()) {
			case 'image':
				if(TinyMCE_SimpleBrowserPlugin.options['browseimageurl']) {
					TinyMCE_SimpleBrowserPlugin.openServerBrowser(field_name, current_url, type, win, TinyMCE_SimpleBrowserPlugin.options['browseimageurl']);
				} else {
					alert("Image browser URL not set.");
				}
				break;
			case 'flash':
				if(TinyMCE_SimpleBrowserPlugin.options['browseflashurl']) {
					TinyMCE_SimpleBrowserPlugin.openServerBrowser(field_name, current_url, type, win, TinyMCE_SimpleBrowserPlugin.options['browseflashurl']);
				} else {
					alert("Flash browser URL not set.");
				}
				break;
			default:
				if(TinyMCE_SimpleBrowserPlugin.options['browselinkurl']) {
					TinyMCE_SimpleBrowserPlugin.openServerBrowser(field_name, current_url, type, win, TinyMCE_SimpleBrowserPlugin.options['browselinkurl']);
				} else {
					alert("Link browser URL not set.");
				}
		}
	},

	openServerBrowser : function(field_name, current_url, link_type, win, browse_url)
	{
			TinyMCE_SimpleBrowserPlugin.options['field'] = field_name;
			TinyMCE_SimpleBrowserPlugin.options['curl'] = current_url;
			TinyMCE_SimpleBrowserPlugin.options['type'] = link_type;
			TinyMCE_SimpleBrowserPlugin.options['target'] = win;

		var sOptions = "toolbar=no,status=no,resizable=yes,dependent=yes";
		sOptions += ",width=" + TinyMCE_SimpleBrowserPlugin.options['width'];
		sOptions += ",height=" + TinyMCE_SimpleBrowserPlugin.options['height'];

		if (tinyMCE.isMSIE)	{
			// The following change has been made otherwise IE will open the file 
			// browser on a different server session (on some cases):
			// http://support.microsoft.com/default.aspx?scid=kb;en-us;831678
			// by <NAME>.
			var oWindow = window.open(browse_url, "TinyMCESimpleBrowserWindow", sOptions ) ;
			oWindow.opener = window;
		} else {
			window.open(browse_url, "TinyMCESimpleBrowserWindow", sOptions );
		}
	},

	browserCallback : function(returnValue) {
		if(!returnValue) return;
		TinyMCE_SimpleBrowserPlugin.options['target'].document.forms[0].elements[TinyMCE_SimpleBrowserPlugin.options['field']].value = returnValue;
	}<commit_msg>add scroll bars to add link window<commit_after>

tinyMCE.importPluginLanguagePack('simplebrowser', 'en');

var TinyMCE_SimpleBrowserPlugin = {
	options : {},
	getInfo : function() {
		return {
			longname : '',
			author : '',
			authorurl : '',
			infourl : '',
			version : ""
		};
	},

	initInstance : function(inst) {
		// You can take out plugin specific parameters
		//alert("Initialization parameter:" + tinyMCE.getParam("template_someparam", false));
		tinyMCE.settings['file_browser_callback'] = "TinyMCE_SimpleBrowserPlugin_browse";
		TinyMCE_SimpleBrowserPlugin.options = {
			width : tinyMCE.getParam("plugin_simplebrowser_width", '800'),
			height : tinyMCE.getParam("plugin_simplebrowser_height", '600'),
			browseimageurl : tinyMCE.getParam("plugin_simplebrowser_browseimageurl", false),
			browselinkurl : tinyMCE.getParam("plugin_simplebrowser_browselinkurl", false),
			browseflashurl : tinyMCE.getParam("plugin_simplebrowser_browseflashurl", false)
		}
	},

	browse : function(field_name, current_url, type, win) {
		switch(type.toLowerCase()) {
			case 'image':
				if(TinyMCE_SimpleBrowserPlugin.options['browseimageurl']) {
					TinyMCE_SimpleBrowserPlugin.openServerBrowser(field_name, current_url, type, win, TinyMCE_SimpleBrowserPlugin.options['browseimageurl']);
				} else {
					alert("Image browser URL not set.");
				}
				break;
			case 'flash':
				if(TinyMCE_SimpleBrowserPlugin.options['browseflashurl']) {
					TinyMCE_SimpleBrowserPlugin.openServerBrowser(field_name, current_url, type, win, TinyMCE_SimpleBrowserPlugin.options['browseflashurl']);
				} else {
					alert("Flash browser URL not set.");
				}
				break;
			default:
				if(TinyMCE_SimpleBrowserPlugin.options['browselinkurl']) {
					TinyMCE_SimpleBrowserPlugin.openServerBrowser(field_name, current_url, type, win, TinyMCE_SimpleBrowserPlugin.options['browselinkurl']);
				} else {
					alert("Link browser URL not set.");
				}
		}
	},

	openServerBrowser : function(field_name, current_url, link_type, win, browse_url)
	{
			TinyMCE_SimpleBrowserPlugin.options['field'] = field_name;
			TinyMCE_SimpleBrowserPlugin.options['curl'] = current_url;
			TinyMCE_SimpleBrowserPlugin.options['type'] = link_type;
			TinyMCE_SimpleBrowserPlugin.options['target'] = win;

		var sOptions = "toolbar=no,status=no,resizable=yes,dependent=yes";
		sOptions += ",width=" + TinyMCE_SimpleBrowserPlugin.options['width'];
		sOptions += ",height=" + TinyMCE_SimpleBrowserPlugin.options['height'];
	    sOptions += ",scrollbars=yes";	

		if (tinyMCE.isMSIE)	{
			// The following change has been made otherwise IE will open the file 
			// browser on a different server session (on some cases):
			// http://support.microsoft.com/default.aspx?scid=kb;en-us;831678
			// by <NAME>.
			var oWindow = window.open(browse_url, "TinyMCESimpleBrowserWindow", sOptions ) ;
			oWindow.opener = window;
		} else {
			window.open(browse_url, "TinyMCESimpleBrowserWindow", sOptions );
		}
	},

	browserCallback : function(returnValue) {
		if(!returnValue) return;
		TinyMCE_SimpleBrowserPlugin.options['target'].document.forms[0].elements[TinyMCE_SimpleBrowserPlugin.options['field']].value = returnValue;
	}
{'fraction_non_alphanumeric': 0.12694136291600633, 'fraction_numerical': 0.004120443740095087, 'mean_word_length': 5.248514851485148, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5716025', 'n_tokens_mistral': 2332, 'n_tokens_neox': 2003, 'n_words': 328}