<commit_before>/***
|''Name''|TiddlySpaceToolbar|
|''Description''|Updates the toolbar macro to use svg buttons and a popup for the more menu|
***/
//{{{
(function($){
	config.macros.toolbar._TSoldHandler = config.macros.toolbar.handler;
	config.macros.toolbar.handler = function(place,macroName,params,wikifier,paramString,tiddler)
	{
		
		this._TSoldHandler(place,macroName,params,wikifier,paramString,tiddler);

		if(config.macros.image && config.macros.image.svgAvailable){ //only do this for people who have this macro available!
			var cancelTiddlerButton =jQuery(".command_cancelTiddler",place);
			cancelTiddlerButton.empty();
			wikify("<<image cancelTiddler.svg>>",cancelTiddlerButton[0]);

			var closeTiddlerButton =jQuery(".command_closeTiddler",place);
			closeTiddlerButton.empty();
			wikify("<<image closeTiddler.svg>>",closeTiddlerButton[0]);

			var editTiddlerButton = jQuery(".command_editTiddler",place);
			editTiddlerButton.empty();
			var img = tiddler.isReadOnly() ? "viewTiddler.svg" : "editTiddler.svg";
			wikify("<<image %0>>".format([img]),editTiddlerButton[0]);

			var deleteTiddlerButton =jQuery(".command_deleteTiddler",place);
			deleteTiddlerButton.empty();
			wikify("<<image deleteTiddler.svg>>",deleteTiddlerButton[0]);

			var saveTiddlerButton =jQuery(".command_saveTiddler",place);
			saveTiddlerButton.empty();
			wikify("<<image saveTiddler.svg>>",saveTiddlerButton[0]);

			var moreTiddlerButton = jQuery("a.moreCommand",place);
			moreTiddlerButton.empty();
			wikify("<<image moreCommand.svg>>",moreTiddlerButton[0]);
		}
	}

	config.macros.toolbar.onClickMore = function(ev)
	{
		var sibling = this.nextSibling;
		var commands = sibling.childNodes;
		var popup = Popup.create(this);
		addClass(popup,"taggedTiddlerList");

		for(var i=0; i < commands.length; i++){
			var li =createTiddlyElement(popup,"li",null);<commit_msg>code cleanup, readOnly class on toolbar<commit_after>/***
|''Name''|TiddlySpaceToolbar|
|''Description''|Updates the toolbar macro to use svg buttons and a popup for the more menu|
***/
//{{{
(function($){
	config.macros.toolbar._TSoldHandler = config.macros.toolbar.handler;
	config.macros.toolbar.handler = function(place,macroName,params,wikifier,paramString,tiddler)
	{
		
		this._TSoldHandler(place,macroName,params,wikifier,paramString,tiddler);
		if(tiddler.isReadOnly()){
			$(place).addClass("toolbarReadOnly");
		}
		if(config.macros.image && config.macros.image.svgAvailable){ //only do this for people who have this macro available!
			var cancelTiddlerButton =$(".command_cancelTiddler",place);
			cancelTiddlerButton.empty();
			wikify("<<image cancelTiddler.svg>>",cancelTiddlerButton[0]);

			var closeTiddlerButton =$(".command_closeTiddler",place);
			closeTiddlerButton.empty();
			wikify("<<image closeTiddler.svg>>",closeTiddlerButton[0]);

			var editTiddlerButton = $(".command_editTiddler",place);
			editTiddlerButton.empty();
			wikify("<<image editTiddler.svg>>",editTiddlerButton[0]);

			var deleteTiddlerButton =$(".command_deleteTiddler",place);
			deleteTiddlerButton.empty();
			wikify("<<image deleteTiddler.svg>>",deleteTiddlerButton[0]);

			var saveTiddlerButton =$(".command_saveTiddler",place);
			saveTiddlerButton.empty();
			wikify("<<image saveTiddler.svg>>",saveTiddlerButton[0]);

			var moreTiddlerButton = $("a.moreCommand",place);
			moreTiddlerButton.empty();
			wikify("<<image moreCommand.svg>>",moreTiddlerButton[0]);
		}
	}

	config.macros.toolbar.onClickMore = function(ev)
	{
		var sibling = this.nextSibling;
		var commands = sibling.childNodes;
		var popup = Popup.create(this);
		addClass(popup,"taggedTiddlerList");

		for(var i=0; i < commands.length; i++){
			var li =createTiddlyElement(popup,"li",null);
{'fraction_non_alphanumeric': 0.15588235294117647, 'fraction_numerical': 0.004010695187165776, 'mean_word_length': 6.264077669902913, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 27, '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': '4720116', 'n_tokens_mistral': 1379, 'n_tokens_neox': 1249, 'n_words': 193}