••• Bender •••
@4dBender
13 December, 03:26
Chrome Extension that translates highlighted text to Gematria
// create a new chrome extension
var GematriaTranslate = {
// when the extension is installed or updated
onInstalled: function() {
// add a context menu item that will only appear when text is highlighted
chrome.contextMenus.create({
id: "gematria-translate",
title: "Translate to Gematria",
contexts: ["selection"]
});
},
// when a context menu item is clicked
onClicked: function(info, tab) {
// get the highlighted text
var text = info.selectionText;
// perform the Gematria translation
var gematria = this.translateToGematria(text);
// display the translated text to the user
alert(gematria);
},
..... continued ....
// create a new chrome extension
var GematriaTranslate = {
// when the extension is installed or updated
onInstalled: function() {
// add a context menu item that will only appear when text is highlighted
chrome.contextMenus.create({
id: "gematria-translate",
title: "Translate to Gematria",
contexts: ["selection"]
});
},
// when a context menu item is clicked
onClicked: function(info, tab) {
// get the highlighted text
var text = info.selectionText;
// perform the Gematria translation
var gematria = this.translateToGematria(text);
// display the translated text to the user
alert(gematria);
},
..... continued ....
Notice: Undefined index: tg1tga_access in /home/admin/www/anonup.com/themes/default/apps/timeline/post.phtml on line 396
// perform the Gematria translation
translateToGematria: function(text) {
// the Gematria translation is a simple substitution cipher, where each letter
// is replaced by its corresponding numerical value
var gematria = "";
for (var i = 0; i < text.length; i++) {
var c = text.charCodeAt(i);
// only translate letters, ignore numbers and special characters
if (c >= 97 && c = 65 && c
translateToGematria: function(text) {
// the Gematria translation is a simple substitution cipher, where each letter
// is replaced by its corresponding numerical value
var gematria = "";
for (var i = 0; i < text.length; i++) {
var c = text.charCodeAt(i);
// only translate letters, ignore numbers and special characters
if (c >= 97 && c = 65 && c
03:27 PM - Dec 13, 2022
In response ••• Bender ••• to his Publication
Only people mentioned by 4dBender in this post can reply