<commit_before>// ==UserScript==
// @name         Share to Telegram (floating bubble)
// @namespace    https://github.com/arieljannai
// @version      0.1
// @description  Adds a share to telegram floating bubble to every site.
// @author       <NAME>
// @icon         https://telegram.org/img/t_logo.png
// ==/UserScript==
/* jshint -W097 */
'use strict';

var floatingButton = '<div id="telegram-share-btn" onclick="javascript:;" title="Send to Telegram"><div id="close-telegram-share" title="Close bubble" onclick="javascript:;"><div id="cross"></div></div></div>';

addGlobalStyle('#telegram-share-btn { background: ' + tlgrmShrGetIcon('telegram') + ' no-repeat; background-size: contain; width: 50px; height: 50px; position: fixed; bottom: 10px; left: 10px; opacity: 0.5; cursor: pointer; } #telegram-share-btn:hover { opacity: 1; }');
addGlobalStyle('#close-telegram-share { background: ' + tlgrmShrGetIcon('close') + ' no-repeat; background-size: contain; top: -15%; right: -15%; width: 30%; height: 30%; position: relative; opacity: 0.5; cursor: pointer; float: right; } #close-telegram-share:hover { opacity: 1; }');

var tempDiv = document.createElement('div');
tempDiv.innerHTML = floatingButton;
document.body.insertAdjacentElement('beforeend', tempDiv.firstChild);

var telegramShareBtn = document.getElementById('telegram-share-btn');
var closeTelegramShare = document.getElementById('close-telegram-share');

telegramShareBtn.onmouseenter = function() {
	closeTelegramShare.style.visibility = 'visible';
}

telegramShareBtn.onmouseleave = function() {<commit_msg>close button hidden by default<commit_after>// ==UserScript==
// @name         Share to Telegram (floating bubble)
// @namespace    https://github.com/arieljannai
// @version      0.1
// @description  Adds a share to telegram floating bubble to every site.
// @author       <NAME>
// @icon         https://telegram.org/img/t_logo.png
// ==/UserScript==
/* jshint -W097 */
'use strict';

var floatingButton = '<div id="telegram-share-btn" onclick="javascript:;" title="Send to Telegram"><div id="close-telegram-share" title="Close bubble" onclick="javascript:;"><div id="cross"></div></div></div>';

addGlobalStyle('#telegram-share-btn { background: ' + tlgrmShrGetIcon('telegram') + ' no-repeat; background-size: contain; width: 50px; height: 50px; position: fixed; bottom: 10px; left: 10px; opacity: 0.5; cursor: pointer; } #telegram-share-btn:hover { opacity: 1; }');
addGlobalStyle('#close-telegram-share { background: ' + tlgrmShrGetIcon('close') + ' no-repeat; background-size: contain; top: -15%; right: -15%; width: 30%; height: 30%; position: relative; opacity: 0.5; cursor: pointer; float: right; visibility: hidden; } #close-telegram-share:hover { opacity: 1; }');

var tempDiv = document.createElement('div');
tempDiv.innerHTML = floatingButton;
document.body.insertAdjacentElement('beforeend', tempDiv.firstChild);

var telegramShareBtn = document.getElementById('telegram-share-btn');
var closeTelegramShare = document.getElementById('close-telegram-share');

telegramShareBtn.onmouseenter = function() {
	closeTelegramShare.style.visibility = 'visible';
}

telegramShareBtn.onmouseleave = function() {
{'fraction_non_alphanumeric': 0.1659880989664892, 'fraction_numerical': 0.01691199498903852, 'mean_word_length': 5.1779497098646035, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 4, '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': '827557', 'n_tokens_mistral': 1021, 'n_tokens_neox': 974, 'n_words': 230}