Skip to content

Instantly share code, notes, and snippets.

@LaPingvino
Forked from anonymous/rizzomaesperanto.user.js
Last active December 15, 2015 10:19
Show Gist options
  • Save LaPingvino/5245007 to your computer and use it in GitHub Desktop.
Save LaPingvino/5245007 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Rizzoma Esperanto translation
// @description translates Rizzoma into Esperanto
// @author Joop Kiefte (ikojba@gmail.com)
// @include https://rizzoma.com/topic/*
// @version 0.2
// ==/UserScript==
var load,execute,loadAndExecute;load=function(a,b,c){var d;d=document.createElement("script"),d.setAttribute("src",a),b!=null&&d.addEventListener("load",b),c!=null&&d.addEventListener("error",c),document.body.appendChild(d);return d},execute=function(a){var b,c;typeof a=="function"?b="("+a+")();":b=a,c=document.createElement("script"),c.textContent=b,document.body.appendChild(c);return c},loadAndExecute=function(a,b){return load(a,function(){return execute(b)})};
load("http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js");
function GM_wait() {
if (document.readyState != "complete") {
window.setTimeout(GM_wait, 100);
} else {
execute(function() {
$(".js-create-wave.js-common-create-wave.create-wave").html("Nova");
$(".js-create-wave.js-common-create-wave.create-wave").attr("title", "Krei novan temon");
$(".js-create-wave-by-wizard.common-create-wave-by-wizard :first-child").html("Nova");
$(".js-create-wave-by-wizard.common-create-wave-by-wizard").attr("title", "Krei novan temon per asistilo");
$(".js-create-wave-by-wizard.create-wave-by-wizard").attr("title", "Krei novan temon per asistilo");
$(".js-topics.tab").html($(".js-topics.tab").html().replace("Topics","Temoj"));
$(".js-mentions.tab").html($(".js-mentions.tab").html().replace("Mentions","Mencioj"));
$(".js-tasks.tab").html($(".js-tasks.tab").html().replace("Tasks","Taskoj"));
$(".js-publics.tab").html($(".js-publics.tab").html().replace("Publics","Publikaĵoj"));
$(".js-next-unread-blip :first-child").each(function(n){$(this).html("Sekva");});
$(".js-help-button")[0].childNodes[2].nodeValue = 'Helpo'
// Commented out because menus stops working...
// $(".search-query-container").html($(".search-query-container").html().replace(/Followed/g,"Sekvataj"));
// $(".search-query-container").html($(".search-query-container").html().replace(/Unfollowed/g,"Nesekvataj"));
// $(".search-query-container").html($(".search-query-container").html().replace(/All topics/g,"Ĉiaj"));
// $("ul.selectBox-dropdown-menu").html($("ul.selectBox-dropdown-menu").html().replace(/Followed/g,"Sekvataj"));
// $("ul.selectBox-dropdown-menu").html($("ul.selectBox-dropdown-menu").html().replace(/Unfollowed/g,"Nesekvataj"));
// $("ul.selectBox-dropdown-menu").html($("ul.selectBox-dropdown-menu").html().replace(/All topics/g,"Ĉiaj"));
});
}
}
GM_wait();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment