// ==UserScript== // @name Small(Mush) // @version 1.5 // @icon http://labare.github.io/SmallMush/ico.png // @match http://mush.vg/ // @match http://mush.vg/#* // @match http://mush.vg/?* // @match http://mush.vg/play* // @match http://mush.twinoid.com/ // @match http://mush.twinoid.com/#* // @match http://mush.twinoid.com/?* // @match http://mush.twinoid.com/play* // @match http://mush.twinoid.es/ // @match http://mush.twinoid.es/#* // @match http://mush.twinoid.es/?* // @match http://mush.twinoid.es/play* // @run-at document-start // @grant unsafeWindow // @author LAbare // ==/UserScript== var Main; // Defined later once the DOM is loaded var unsafeSM = createObjectIn(unsafeWindow, { defineAs: "SM" }); /**—————————————————————————————**\ * SMALL(MUSH) * * by LAbare * * Script pour Mush sur mobile * * v1.5 * \**—————————————————————————————**/ var SM = { isUserscript: true, version: "1.5" }; /* FONCTIONS DÉVELOPPEUR */ SM.toArray = function(obj) { return [].slice.call(obj); }; SM.sel = function(name, parent) { var context = parent || document; var simple = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/.test(name); if (name[0] == "." && simple) { return context.getElementsByClassName(name.slice(1))[0]; } else if (name[0] == '#' && simple) { return document.getElementById(name.slice(1)); } else { return context.querySelector(name); } }; SM.selAll = function(name, parent) { var context = parent || document; var simple = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/.test(name); if (name[0] == "." && simple) { return SM.toArray(context.getElementsByClassName(name.slice(1))); } else { return SM.toArray(context.querySelectorAll(name)); } }; SM.getAttributesDict = function(el) { if (el.attributes == undefined) { return null; } var attrs = {}; for (var i = 0; i < el.attributes.length; i++) { if (el.attributes[i].name != 'id') { attrs[el.attributes[i].name] = el.attributes[i].value; } }; return attrs; }; SM.addNewEl = function(type, parent, id, content, attrs) { if (['svg', 'path', 'rect', 'text'].indexOf(type) != -1) { var el = document.createElementNS('http://www.w3.org/2000/svg', type); } else { var el = document.createElement(type); } if (id) { el.id = id; } if (content) { el.innerHTML = content; } if (attrs) { for (i in attrs) { el.setAttribute(i, attrs[i]); } } if (parent) { parent.appendChild(el); } return el; }; SM.addButton = function(parent, text, attrs) { var butattrs = { class: 'but' }; if (attrs) { for (i in attrs) { if (i == 'class') { butattrs['class'] += ' ' + attrs[i]; } else { butattrs[i] = attrs[i]; } } } var but = SM.addNewEl('div', ((parent) ? parent : null), null, null, butattrs); SM.addNewEl('div', SM.addNewEl('div', but, null, null, { class: 'butright' }), null, text, { class: 'butbg' }); return but; }; SM.moveEl = function(el, dest, bef) { if (el.parentNode) { el.parentNode.removeChild(el); } if (bef) { dest.insertBefore(el, bef); } else { dest.appendChild(el); } return el; }; SM.copyEl = function (el, dest, bef) { var newEl = SM.addNewEl(el.nodeName, null, ((el.id) ? 'SM' + el.id : ''), el.innerHTML, SM.getAttributesDict(el)); var children = newEl.getElementsByTagName("*"); for (var i = 0; i < children.length; i++) { if (children[i].id) { children[i].id = 'SM' + children[i].id; } } if (dest) { if (bef) { dest.insertBefore(newEl, bef); } else { dest.appendChild(newEl); } } return newEl; }; SM.getTipContent = function(tipFunction) { tipFunction(); var tipContent = SM.sel('.tipcontent').innerHTML; Main.hideTip(); return tipContent; }; SM.reformat = function(text) { return text.replace(/\\r|\\n|\r|\n/g, '').replace(/\s+/g, ' ').replace(/\\'/g, "'").replace(/ /g, ' '); }; /* FONCTIONS SMALL(MUSH) */ SM.generateMinimap = function() { var rooms = [['m129.5 10.5 0 20 -20 0 0 60 100 0 0 -60 -20 0 0 -20 -60 0z', [155, 50]], [60, 120, 249.5, 230.5], [60, 120, 9.5, 230.5], [60, 120, 249.5, 350.5], [60, 40, 129.5, 310.5], [80, 60, 69.5, 170.5], [80, 60, 69.5, 110.5], [100, 60, 109.5, 250.5], [80, 60, 169.5, 110.5], [180, 90, 69.5, 430.5], [40, 40, 209.5, 50.5], [40, 40, 249.5, 190.5], [40, 40, 249.5, 470.5], [40, 40, 69.5, 50.5], [40, 40, 29.5, 190.5], [40, 40, 29.5, 470.5], [], [], [], [], [], [], [], [], ['m69.5 90.5 0 20 80 0 0 120 20 0 0 -120 80 0 0 -20 -180 0z', [160, 92]], [180, 20, 69.5, 230.5], [220, 20, 29.5, 350.5], [], [60, 100, 9.5, 370.5], ['m209.5 290.5 0 20 -20 0 0 40 60 0 0 -60 -40 0z', [210, 320]], ['m69.5 290.5 0 60 60 0 0 -40 -20 0 0 -20 -40 0z', [100, 320]], [80, 60, 169.5, 170.5], [40, 40, 209.5, 250.5], [40, 60, 209.5, 370.5], [40, 40, 69.5, 250.5], [40, 60, 69.5, 370.5]]; //var doors = [[30.5, 104.5, 10, 0], [30.5, 54.5, 10, 0], [45.5, 74.5, 0, 10], [175.5, 129.5, 0, 10], [115.5, 129.5, 0, 10], [115.5, 124.5, 10, 0], [150.5, 124.5, 10, 0], [130.5, 124.5, 10, 0], [115.5, 19.5, 0, 10], [115.5, 34.5, 10, 0], [175.5, 19.5, 0, 10], [150.5, 34.5, 10, 0], [130.5, 34.5, 10, 0], [220.5, 124.5, 10, 0], [235.5, 129.5, 0, 10], [175.5, 124.5, 10, 0], [175.5, 74.5, 0, 10], [85.5, 59.5, 0, 10], [100.5, 34.5, 10, 0], [90.5, 74.5, 10, 0], [70.5, 74.5, 10, 0], [125.5, 74.5, 0, 10], [70.5, 84.5, 10, 0], [85.5, 89.5, 0, 10], [240.5, 124.5, 10, 0], [240.5, 34.5, 10, 0], [220.5, 34.5, 10, 0], [215.5, 109.5, 0, 10], [215.5, 39.5, 0, 10], [45.5, 109.5, 0, 10], [100.5, 124.5, 10, 0], [45.5, 39.5, 0, 10], [235.5, 19.5, 0, 10], [115.5, 74.5, 0, 10], [90.5, 84.5, 10, 0], [185.5, 19.5, 0, 10], [175.5, 109.5, 0, 10], [175.5, 39.5, 0, 10], [185.5, 109.5, 0, 10], [185.5, 39.5, 0, 10]]; var doors = [['209.5 60.5 0 20', '0-10'], ['109.5 60.5 0 20', '0-13'], ['149.5 90.5 20 0', '0-24'], ['259.5 350.5 20 0', '1-3'], ['259.5 230.5 20 0', '1-11'], ['249.5 230.5 0 20', '1-25'], ['249.5 300.5 0 20', '1-29'], ['249.5 260.5 0 20', '1-32'], ['39.5 230.5 20 0', '2-14'], ['69.5 230.5 0 20', '2-25'], ['39.5 350.5 20 0', '2-26'], ['69.5 300.5 0 20', '2-30'], ['69.5 260.5 0 20', '2-34'], ['249.5 440.5 0 20', '3-9'], ['259.5 470.5 20 0', '3-12'], ['249.5 350.5 0 20', '3-26'], ['149.5 350.5 20 0', '4-26'], ['119.5 170.5 20 0', '5-6'], ['69.5 200.5 0 20', '5-14'], ['149.5 180.5 0 20', '5-24'], ['149.5 140.5 0 20', '6-24'], ['149.5 250.5 20 0', '7-25'], ['169.5 140.5 0 20', '8-24'], ['179.5 170.5 20 0', '8-31'], ['249.5 480.5 0 20', '9-12'], ['69.5 480.5 0 20', '9-15'], ['69.5 440.5 0 20', '9-28'], ['219.5 430.5 20 0', '9-33'], ['79.5 430.5 20 0', '9-35'], ['219.5 90.5 20 0', '10-24'], ['249.5 200.5 0 20', '11-31'], ['79.5 90.5 20 0', '13-24'], ['39.5 470.5 20 0', '15-28'], ['149.5 230.5 20 0', '24-25'], ['169.5 180.5 0 20', '24-31'], ['39.5 370.5 20 0', '26-28'], ['219.5 350.5 20 0', '26-29'], ['79.5 350.5 20 0', '26-30'], ['219.5 370.5 20 0', '26-33'], ['79.5 370.5 20 0', '26-35']]; var popup = SM.sel('#SMpopup'); popup.innerHTML = ''; SM.addButton(popup, "X", { id: 'SMpopupclose' }).addEventListener('click', function() { SM.sel('#SMpopup').style.display = 'none'; }); popup.style.display = 'block'; SM.addNewEl('h4', popup, null, " " + SM.TEXT['minimap-title']); SM.addNewEl('p', popup, null, SM.TEXT['minimap-warning']); SM.addNewEl('p', popup, null, SM.TEXT['minimap-legend']).className = 'SMnospace'; SM.addNewEl('p', popup, null, SM.TEXT['minimap-room']).className = 'SMnospace'; var al = { fAl: 'fire', dAl: 'door', eAl: 'alert' }; //Incendies, portes, équipements for (var j in al) { var k = SM.sel('.alarm_bg [src$="/' + al[j] + '.png"]'); al[j] = ((k) ? SM.reformat(k.parentNode.getAttribute('onmouseover')) : ''); } var bloc = SM.addNewEl('div', popup, 'SMminimapbloc'); var svg = SM.addNewEl('svg', bloc, 'SMminimap', null, { width: '320', height: '530' }); var myroom = SM.rooms.indexOf(SM.sel('#input').getAttribute('d_name')); for (var i = 0; i < rooms.length; i++) { var r = rooms[i]; if (!r.length) { continue; } var regexp = RegExp(SM.alertrooms[i] + '\\s\*\[\^2\]\{0,10}\\s\*\\.', 'g'); //Attention à Baie Alpha et Baie Alpha 2 if (regexp.test(al.fAl)) { var roomclass = 'SMmaproom SMmapfire'; } else { var roomclass = 'SMmaproom'; } if (i == myroom) { roomclass += ' SMmyroom'; } var selectRoom = function() { var halo = SM.sel('#SMmapselected'); if (halo) { halo.id = ''; } SM.sel('#SMminimaproom').textContent = SM.localerooms[parseInt(this.getAttribute('data-maproom'))]; this.id = 'SMmapselected'; } if (r.length == 2) { //Pièce non rectangulaire SM.addNewEl('path', svg, null, null, { d: r[0], 'data-maproom': i, class: roomclass }).addEventListener('click', selectRoom); var c = r[1]; } else { //Pièce rectangulaire SM.addNewEl('rect', svg, null, null, { width: r[0], height: r[1], x: r[2], y: r[3], 'data-maproom': i, class: roomclass }).addEventListener('click', selectRoom); var c = [r[2] + (r[0] / 2), r[3] + (r[1] / 2) - 10]; } //Avaries signalées //
/g, ''); //Le double retour à la ligne disparaît
t = t.replace(/\*+([^\*]*)\*+/g, '$1'); //Les astérisques simples suffisent à faire du gras
t = t.replace(/<(\/?)pre>/g, '<$1code>'); // (.*)<\/strong><\/p>/)[1] + "//";
desc = SM.reformat(desc.replace(//g, "$1").replace(/(.*)<\/strong>/g, "$1"));
}
message += "- " + text.match(/ Copyright © 2015-2016 LAbare L'autorisation est accordée, gracieusement, à toute personne acquérant une copie de ce script et des fichiers de documentation associés (le « Script »), de commercialiser le Script sans restriction, notamment les droits d'utiliser, de copier, de modifier, de fusionner, de publier, de distribuer, de sous-licencier et/ou de vendre des copies du Script, ainsi que d'autoriser les personnes auxquelles le Script est fourni à le faire, sous réserve des conditions suivantes : La déclaration de copyright ci-dessus et la présente autorisation doivent être incluses dans toute copie ou partie substantielle du Script. Le Script est fourni « tel quel », sans garantie d'aucune sorte, explicite ou implicite, notamment sans garantie de qualité marchande, d’adéquation à un usage particulier et d'absence de contrefaçon. En aucun cas les auteurs ou titulaires du droit d'auteur ne seront responsables de tout dommage, réclamation ou autre responsabilité, que ce soit dans le cadre d'un contrat, d'un délit ou autre, en provenance de, consécutif à ou en relation avec le Script ou son utilisation, ou avec d'autres éléments du Script. Bref, si ça casse, c'est pas ma faute. Mais ça va pas casser, normalement. À peine. Moi, j'y crois. Facilite la mise en forme des messages et permet leur prévisualisation. Permet de charger le script AstroPad. Copyright © 2015-2016 LAbare Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. The Software is provided \"as is\", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the Software or the use or other dealings in the Software. Basically, if the script goes berzerk, stabs your kids and burns your house, I’m not to blame. But nothing bad should happen, not even a script-breaking bug. Trust me. Allows formatting and previewing messages. This tab loads the AstroPad script. Licencia MIT — Traducción no oficial ni autorizada para su uso como licencia legal. Copyright © 2015-2016 LAbare Se concede permiso por la presente, de forma gratuita, a cualquier persona que obtenga una copia de este software y de los archivos de documentación asociados (el «Script»), para utilizar el Script sin restricción, incluyendo sin limitación los derechos de usar, copiar, modificar, fusionar, publicar, distribuir, sublicenciar, y/o vender copias de este Script, y para permitir a las personas a las que se les proporcione el Script a hacer lo mismo, sujeto a las siguientes condiciones: El aviso de copyright anterior y este aviso de permiso se incluirán en todas las copias o partes sustanciales del Script. El Script se proporciona «tal cual», sin garantía de ningún tipo, expresa o implícita, incluyendo pero no limitado a garantías de comercialización, idoneidad para un propósito particular y no infracción. en ningún caso los autores o titulares del copyright serán responsables de ninguna reclamación, daños u otras responsabilidades, ya sea en un litigio, agravio o de otro modo, que surja de o en conexión con el Script o el uso u otro tipo de acciones en el Script. Básicamente, si el script se vuelve un berzerker, apuñala a tus hijos, y quema tu casa, no me culpes. Pero nada malo debería ocurrir, ni siquiera un bug relacionado al script. Confía en mí. Permite modificar el formato y ver una previsualización. Permite cargar el script AstroPad. non fonctionnel
t = t.replace(/(.*)<\/a>/g, '[link=$1]$2[/link]'); //Liens non fonctionnels
t = t.replace(/(.*)<\/span>(.*)<\/span><\/span>/g, '[rp=$1]$2[/rp]'); //Balise RP
if (SM.ME_NERON) { //Commande /neron
t = t.replace(/\/neron /, ' NERON : ');
}
for (var i = 0; i < SM.smileys.length; i++) { //Smileys Mush
t = t.replace(RegExp(':\(' + SM.smileys[i][0] + '\):', 'g'), '');
}
SM.sel("#tid_wallPost_preview").innerHTML = t;
};
SM.savePreview = function() {
if (SM.sel('#tid_wallPost').value) {
SM.previewtext = SM.sel('#tid_wallPost').value.slice(0, 2500);
var date = new Date();
date.setTime(date.getTime() + 31536000000);
document.cookie = 'SMptext=' + encodeURIComponent(SM.previewtext) + '; expires=' + date.toGMTString() + '; path=/';
}
};
SM.retrievePreview = function() {
var cookies = document.cookie.split('; ');
for (var i = 0; i < cookies.length; i++) {
var cookie = cookies[i].split('=');
if (cookie[0] == 'SMptext') {
if (SM.sel('#tid_wallPost').value && !confirm(SM.TEXT['message-overwrite_retrieve'])) {
return false;
}
var saved = decodeURIComponent(cookie[1]);
SM.previewtext = saved;
SM.sel("#tid_wallPost").value = saved;
SM.refreshPreview();
}
}
};
SM.buildMessage = function() {
var wallpost = SM.sel('#tid_wallPost');
if (wallpost.value && confirm(SM.TEXT['message-overwrite_build'])) {
var message = wallpost.value + "\n\n\n\n";
}
else {
var message = "";
}
var popup = SM.sel('#SMpopup');
popup.innerHTML = '';
switch(SM.sel('#SMpremessages').value) {
case 'inventory':
message += "**" + SM.sel('#input').getAttribute('d_name') + " :** "; //Nom de la pièce
var inventory = SM.sel('#room').children;
var nb = 0; //inventory.length compterait les objets personnels ou cachés
for (var i = 0; i < inventory.length; i++) {
var item = inventory[i];
if (item.className == 'item cdEmptySlot') { //On arrête dès qu'on tombe sur un slot vide
break;
}
if (/hidden\.png/.test(item.getAttribute('data-name'))) { //On ne liste pas les objets cachés
continue;
}
if (/(tracker|talky_walky|super_talky)\.jpg/.test(item.innerHTML)) { //Ni les objets personnels
continue;
}
nb += 1;
var n = (
(item.getAttribute('data-id') == 'BOOK')
? decodeURIComponent(/namey[0-9]+:(.+)g$/.exec(item.getAttribute('data-tip'))[1]) //Pour avoir la compétence en cas d'apprenton
: item.getAttribute('data-name').trim() //Pour avoir les attributs (lourd, cassé, etc.) pour les autres objets
);
n = n.replace(//, " //" + SM.TEXT['preformat-inventory-diseased'] + "//");
n = n.replace(//, " //" + SM.TEXT['preformat-inventory-thirsty'] + "//");
n = n.replace(//, " //" + SM.TEXT['preformat-inventory-dry'] + "//");
n = n.replace(//, " //" + SM.TEXT['preformat-inventory-broken'] + "//"); //Objet cassé
n = n.replace(/x([0-9]+)/, " [$1 " + SM.TEXT['preformat-inventory-charge'] + "]"); //Charges
n = n.replace(/ ?/g, ''); //Les autres attributs n'importent pas
message += n;
if (item.lastElementChild.className == 'qty') { //Quantité
message += " (x" + item.lastElementChild.textContent.trim() + ")";
}
message += ', ';
}
var it = Main.items.iterator();
while (it.hasNext()) {
var e = it.next().iid;
if ((e == 'HELP_DRONE' || e == 'CAMERA') && !SM.sel('[serial="' + e.serial + '"]')) { //Équipements seulement, pas en items (caméra installée)
message += "//" + SM.TEXT['preformat-inventory-' + e] + "//, ";
nb += 1;
}
}
var cat = Main.npc.iterator(); //Schrödinger
if (cat.hasNext()) {
message += "//Schrödinger//, ";
nb += 1;
}
if (nb) {
message = message.slice(0, -2) + ".";
}
else {
message += SM.TEXT['preformat-inventory-empty'] + ".";
}
wallpost.value = message;
SM.refreshPreview();
break;
case 'researches':
if (!SM.sel('#research_module')) {
alert(SM.TEXT['preformat-researches-nomodule']);
break;
}
message += ":pills: **//" + SM.TEXT['preformat-researches-title'] + " //**:pills:\n\n\n\n";
var cards = document.getElementsByClassName('cdProjCard');
for (var i = 0; i < cards.length; i++) {
message += "**" + cards[i].firstElementChild.textContent.trim() + " :** ";
message += SM.sel('[data-p="' + cards[i].getAttribute('data-p') + '"] #p').textContent.trim() + "\n";
}
wallpost.value = message;
SM.refreshPreview();
break;
case 'researches++':
if (!SM.sel('#research_module')) {
alert(SM.TEXT['preformat-researches-nomodule']);
break;
}
var researches = [];
popup.style.display = 'block';
SM.addNewEl('h3', popup, null, SM.TEXT['preformat-researches++-title']);
var table = SM.addNewEl('table', popup);
var h = SM.addNewEl('thead', table);
SM.addNewEl('td', h, null, SM.TEXT['preformat-researches++-share']); //Partager ?
SM.addNewEl('td', h, null, SM.TEXT['preformat-researches++-name']); //Nom
SM.addNewEl('td', h, null, SM.TEXT['preformat-researches++-progress']); //Progression
SM.addNewEl('td', h, null, SM.TEXT['preformat-researches++-important']); //Prioritaire ?
SM.addNewEl('td', h, null, SM.TEXT['preformat-researches++-relay']); //Relais nécessaire ?
var cards = document.getElementsByClassName('cdProjCard');
for (var i = 0; i < cards.length; i++) {
var name = cards[i].firstElementChild.textContent.trim();
var progress = SM.sel('[data-p="' + cards[i].getAttribute('data-p') + '"] #p').textContent.trim();
var l = SM.addNewEl('tr', table, null, null, { class: 'SMresearch' });
SM.addNewEl('td', l, null, '').className = 'SMcenter';
SM.addNewEl('td', l, null, name);
SM.addNewEl('td', l, null, progress);
SM.addNewEl('td', l, null, '').className = 'SMcenter';
SM.addNewEl('td', l, null, '').className = 'SMcenter';
}
//Création du message
SM.addButton(popup, SM.TEXT['preformat-researches++-submit']).addEventListener('click', function() {
message += ":pills: **//" + SM.TEXT['preformat-researches-title'] + " //**:pills:\n\n\n\n";
var researches = document.getElementsByClassName('SMresearch');
for (var i = 0; i < researches.length; i++) {
var children = researches[i].children;
if (children[0].firstChild.checked) { //À partager
message += '**' + children[1].textContent + ' :** ';
message += children[2].textContent;
if (children[3].firstChild.checked) { //Prioritaire
message += ", **//" + SM.TEXT['preformat-researches++-text_important'] + "//**";
}
if (children[4].firstChild.checked) { //À relayer
message += ", //" + SM.TEXT['preformat-researches++-text_relay'] + "//";
}
message += ".\n";
}
SM.sel('#SMpopup').style.display = 'none';
}
wallpost.value = message;
SM.refreshPreview();
});
break;
case 'projects':
if (!/img\/cards\/projects/.test(SM.sel('#cdModuleContent').innerHTML)) { //Pas d'ID spécifique au Cœur de NERON :(
alert(SM.TEXT['preformat-projects-nomodule']);
break;
}
message += ":pa_core: **//" + SM.TEXT['preformat-projects-title'] + " //**:pa_core:\n\n\n\n";
var cards = document.getElementsByClassName('cdProjCard');
for (var i = 0; i < cards.length; i++) {
message += "**" + cards[i].firstElementChild.textContent.trim() + " :** ";
message += SM.sel('[data-p="' + cards[i].getAttribute('data-p') + '"] .desc').textContent.trim() + "\n";
}
wallpost.value = message;
SM.refreshPreview();
break;
case 'planet':
if (!SM.sel('#navModule')) {
alert(SM.TEXT['preformat-planet-nomodule']);
break;
}
var planets = document.querySelectorAll('[class="planet"]');
switch (planets.length) {
case 0:
alert(SM.TEXT['preformat-planet-none']);
break;
case 1:
wallpost.value = SM.preformatPlanet(planets[0]);
SM.refreshPreview();
break;
case 2:
popup.style.display = 'block';
popup.style.top = '200px';
SM.addNewEl('h3', popup, null, SM.TEXT['preformat-planet-title']);
SM.addButton(popup, planets[0].firstElementChild.textContent).addEventListener('click', function() {
message += SM.preformatPlanet(planets[0]);
SM.sel('#tid_wallPost').value = message;
SM.refreshPreview();
SM.sel('#SMpopup').style.display = 'none';
SM.sel('#SMpopup').style.top = '100px';
}); //Première planète
SM.addButton(popup, planets[1].firstElementChild.textContent).addEventListener('click', function() {
message += SM.preformatPlanet(planets[1]);
SM.sel('#tid_wallPost').value = message;
SM.refreshPreview();
SM.sel('#SMpopup').style.display = 'none';
SM.sel('#SMpopup').style.top = '100px';
}); //Seconde planète
SM.addButton(popup, SM.TEXT['preformat-planet-both']).addEventListener('click', function() {
message += SM.preformatPlanet(planets[0]) + "\n\n\n\n" + SM.preformatPlanet(planets[1]);
SM.sel('#tid_wallPost').value = message;
SM.refreshPreview();
SM.sel('#SMpopup').style.display = 'none';
SM.sel('#SMpopup').style.top = '100px';
}); //Les deux planètes
break;
}
break;
case 'comms':
if (!SM.sel('#trackerModule')) {
alert(SM.TEXT['preformat-comms-nomodule']);
break;
}
message += ":com: " + SM.TEXT['preformat-comms-title'] + ":com:\n\n\n\n";
//Qualité du signal
message += SM.TEXT['preformat-comms-signal'] + SM.sel('#trackerModule .sensors p:first-of-type em').textContent.match(/[0-9]+\s*%/)[0] + "\n";
//Xyloph
message += SM.TEXT['preformat-comms-Xyloph'];
var dbs = SM.toArray(document.querySelectorAll('#trackerModule .perfor li:not(.undone)'));
if (dbs.length) {
message += dbs.length + "/12\n";
var writedesc = confirm(SM.TEXT['preformat-comms-Xylophdesc']);
for (var i = 0; i < dbs.length; i++) {
var text = SM.reformat(SM.getTipContent(dbs[i].onmouseover));
var desc = "";
if (writedesc) {
desc = " : //" + text.match(/
(.*)<\/h1>/)[1] + desc + "\n";
}
}
else {
message += SM.TEXT['preformat-comms-Xylophnone'] + "\n";
}
//Bases rebelles
message += SM.TEXT['preformat-comms-bases'];
var bases = SM.toArray(document.querySelectorAll('#trackerModule .bases [data-id]')).reverse();
var anysignal = false;
var writedesc = confirm(SM.TEXT['preformat-comms-basesdesc']);
for (var i = 0; i < bases.length; i++) {
var id = bases[i].getAttribute('data-id');
var span = SM.sel('#trackerModule [data-id="' + id + '"] span');
var decoded = ((SM.sel('#trackerModule [data-id="' + id + '"] h3').textContent.trim() != "???") ? true : false);
var name = id.toLowerCase().replace(/_/, "-").replace(/\b\w/g, function (l) { return l.toUpperCase(); });
if (!span && !decoded) { //Signal pas encore envoyé
continue;
}
if (!anysignal) {
message += "\n";
anysignal = true;
}
message += "- //" + name + " (" + SM.TEXT['abbr-day'] + (i + 2) + ") : //"; //Nom de la base
if (decoded) { //Décodée
var text = SM.reformat(SM.getTipContent(bases[i].onmouseover));
var desc = "";
if (writedesc) {
desc = ", //" + text.match(/
(.*)<\/h1>/g);
var unknown = 0;
var mess;
//Détection orbite ou espace infini
if (SM.sel('.planet .pllist').firstElementChild.firstChild.tagName == 'IMG') { //En orbite
mess = SM.TEXT['preformat-planet-orbiting'] + " **" + name + " :** ";
}
else { //Dans l'espace infini, donc fuel et direction nécessaires
var direction = planet.children[2].children[1].children[0].innerHTML.replace(/(?:.*)<\/span>/, '').trim();
var fuel = planet.children[2].children[1].children[1].innerHTML.replace(/(?:.*)<\/span>/, '').trim();
mess = "**" + name + " :** //" + direction + "//, " + fuel + " :fuel: ; ";
}
//Zones + zones non analysées
for (var i = 0; i < zones.length; i++) {
var zone = zones[i].slice(4, -5);
if (zone == '???') {
unknown += 1;
}
else {
mess += zone + ', ';
}
}
if (unknown) {
mess += "//" + unknown + " " + SM.TEXT['preformat-planet-unknown'] + '//, ';
}
mess = mess.slice(0, -2) + '.';
return mess;
};
/* CHARGEMENT DE L'ASTROPAD */
SM.astroTab = function() {
if (SM.isUserscript || SM.AstroPadLoaded) { //Ne pas déclencher si userscript ou si déjà chargé (pour éviter le doublon)
return false;
}
var tab = SM.addNewEl('li', SM.sel('.tabschat'), 'astrotab', '', { 'data-script-tab': '#astrotab_content' });
tab.style.marginRight = '3px';
tab.onmouseover = function() { Main.showTip(this, SM.TEXT['astrotab-tip']); };
tab.addEventListener('mouseout', function() { Main.hideTip(); });
tab.addEventListener('click', function() { SM.changeChatTab(this); });
tab.className = 'tab taboff';
var content = SM.addNewEl('div', SM.sel('#chatBlock'), 'astrotab_content');
content.style.display = 'none';
SM.addNewEl('p', content, null, SM.TEXT['astrotab-warning']).className = 'SMtabwarning';;
SM.addButton(content, SM.TEXT['astrotab-button']).addEventListener('click', function() {
this.firstChild.firstChild.innerHTML = " " + SM.TEXT['astrotab-loading'];
SM.sel('#astrotab').setAttribute('data-script-function', 'Main.AstroPad.getInventory');
SM.addNewEl('script', document.body, null, null, { src: 'https://github.com/badconker/astropad/raw/master/astropad.user.js', async: 'true' }).onload = function() {
SM.AstroPadLoaded = true;
unsafeWindow.Main.AstroPad.fill(''); //Au cas où il n'y a pas encore de pad d'enregistré
unsafeWindow.Main.AstroPad.getInventory();
};
});
}
/* FONCTION DE LOCALISATION */
SM.locale = function(cb) {
SM.TEXT = {};
var lang = parseInt(SM.settings['locale']);
if (typeof cb == 'undefined') {
var cb = function() { return true; };
}
//Doit rester indépendant de la locale choisie puisqu'en interaction avec la page elle-même
//.alertroom : certaines pièces (ex. Jardin) sont mal écrites dans les rapports d'alerte
switch (document.domain) {
case 'mush.vg':
SM.rooms = ['Pont', 'Baie Alpha', 'Baie Beta', 'Baie Alpha 2', 'Nexus', 'Infirmerie', 'Laboratoire', 'Réfectoire', 'Jardin Hydroponique', 'Salle des moteurs', 'Tourelle Alpha avant', 'Tourelle Alpha centre', 'Tourelle Alpha arrière', 'Tourelle Beta avant', 'Tourelle Beta centre', 'Tourelle Beta arrière', 'Patrouilleur Longane', 'Patrouilleur Jujube', 'Patrouilleur Tamarin', 'Patrouilleur Socrate', 'Patrouilleur Epicure', 'Patrouilleur Platon', 'Patrouilleur Wallis', 'Pasiphae', 'Couloir avant', 'Couloir central', 'Couloir arrière', 'Planète', 'Baie Icarus', 'Dortoir Alpha', 'Dortoir Beta', 'Stockage Avant', 'Stockage Alpha centre', 'Stockage Alpha arrière', 'Stockage Beta centre', 'Stockage Beta arrière', 'Espace infini', 'Les Limbes'];
SM.alertrooms = SM.toArray(SM.rooms);
SM.alertrooms[8] = 'Jardin Hydoponique'; //hydRo
SM.alertrooms[28] = 'Icarus'; //Pas de "Baie"
break;
case 'mush.twinoid.es':
SM.rooms = ['Puente de mando', 'Plataforma Alpha', 'Plataforma Beta', 'Plataforma Alpha 2', 'Nexus', 'Enfermería', 'Laboratorio', 'Comedor', 'Jardín Hidropónico', 'Sala de motores', 'Cañón Alpha delantero', 'Cañón Alpha central', 'Cañón Alpha trasero', 'Cañón Beta delantero', 'Cañón Beta central', 'Cañón Beta trasero', 'Patrullero Longane', 'Patrullero Jujube', 'Patrullero Tamarindo', 'Patrullero Sócrates', 'Patrullero Epicuro', 'Patrullero Platón', 'Patrullero Wallis', 'Pasiphae', 'Pasillo delantero', 'Pasillo central', 'Pasillo trasero', 'Planeta', 'Icarus', 'Dormitorio Alpha', 'Dormitorio Beta', 'Almacén delantero', 'Almacén Alpha central', 'Almacén Alpha trasero', 'Almacén Beta central', 'Almacén Beta trasero', 'Espacio infinito', 'El limbo'];
SM.alertrooms = SM.toArray(SM.rooms);
break;
default:
SM.rooms = ['Bridge', 'Alpha Bay', 'Bravo Bay', 'Alpha Bay 2', 'Nexus', 'Medlab', 'Laboratory', 'Refectory', 'Hydroponic Garden', 'Engine Room', 'Front Alpha Turret', 'Centre Alpha Turret', 'Rear Alpha Turret', 'Front Bravo Turret', 'Centre Bravo Turret', 'Rear Bravo Turret', 'Patrol Ship Tomorrowland', 'Patrol Ship Olive Grove', 'Patrol Ship Yasmin', 'Patrol Ship Wolf', 'Patrol Ship E-Street', 'Patrol Ship Eponine', 'Patrol Ship Carpe Diem', 'Pasiphae', 'Front Corridor', 'Central Corridor', 'Rear Corridor', 'Planet', 'Icarus Bay', 'Alpha Dorm', 'Bravo Dorm', 'Front Storage', 'Centre Alpha Storage', 'Rear Alpha Storage', 'Centre Bravo Storage', 'Rear Bravo Storage', 'Outer Space', 'Limbo'];
SM.alertrooms = SM.toArray(SM.rooms);
}
switch (lang)
{
case 1: //Français
SM.TEXT['SMpageload'] = " Préparation de Small(Mush)…";
SM.TEXT['stats_perso'] = "Vos statistiques actuelles : "; //Espace
SM.TEXT['AP-general'] = "point(s) d'action";
SM.TEXT['AP-eng'] = "point(s) de mécanique";
SM.TEXT['AP-garden'] = "point(s) de jardinage";
SM.TEXT['AP-neron'] = "point(s) de Nexus";
SM.TEXT['AP-comp'] = "point(s) d'informatique";
SM.TEXT['AP-heal'] = "point(s) de soin";
SM.TEXT['AP-pilgred'] = "point(s) de PILGRED";
SM.TEXT['AP-shoot'] = "point(s) de tir";
SM.TEXT['AP-cook'] = "point(s) de cuisine";
SM.TEXT['AP-klix'] = "Klix";
SM.TEXT['hide_alert_reports'] = "Cacher les rapports (%1)";
SM.TEXT['show_alert_reports'] = "Lister les rapports (%1)";
SM.TEXT['unvalid_move'] = "Cette porte est cassée, vous ne pouvez pas vous déplacer !";
SM.TEXT['move_confirm'] = "Voulez-vous vous déplacer vers "; //Espace
SM.TEXT['move_alert'] = "ATTENTION : il semble très probable que vous ne puissiez pas vous déplacer actuellement. Si c'est le cas, un message d'erreur peut s'afficher. Continuer ?";
SM.TEXT['move_guardian'] = "ATTENTION : quelqu'un garde cette pièce. À moins que vous ne soyez Fuyant, un message d'erreur peut s'afficher si vous vous dirigez vers la mauvaise pièce. Continuer ?";
SM.TEXT['current_room'] = "Vous êtes en : "; //Espace
SM.TEXT['move_button'] = "Se déplacer vers :";
SM.TEXT['broken_door'] = " — CASSÉE";
SM.TEXT['door_to'] = "Porte → "; //Espace
SM.TEXT['SMsettings-title'] = "Paramètres de Small(Mush)";
SM.TEXT['SMsettings-islarge'] = "Mode Ordi (interface plus large, chat toujours affiché)";
SM.TEXT['SMsettings-confirm_action'] = "Confirmer les actions";
SM.TEXT['SMsettings-food_desc'] = "Afficher les effets des aliments sous l'inventaire";
SM.TEXT['SMsettings-forced_locale'] = "Forcer la langue de Small(Mush)";
SM.TEXT['SMsettings-lang_title'] = "Langue de l'interface Small(Mush) :";
SM.TEXT['SMsettings-chat_unload'] = "Délester le chat";
SM.TEXT['SMsettings-chat_unload_tip'] = "
Délester le chat
Le canal général sera rendu plus léger au rechargement.
(Désolé…)
Veuillez attacher vos ceintures.";
SM.TEXT['SMsettings-credits'] = "Script codé par LAbare. Licence MIT.
Traduction espagnole par CptArgentina et Guilherande (merci !).";
SM.TEXT['SMsettings-credits_beta'] = " Merci aux beta-testeurs :
LAbare (bah ouais)
Heimdall, que personne ni Windows n'aime
Breith le poney de l'Apocalypse
lucasmore le paumé de l'espace
Hyomin l'Augure stalker
Guilherande, la plus beta des testeuses
badconker, dont vient le délestage du chat
Contry la pas bavarde
Bronu, rentré sur Sol en plein milieu de la beta";
SM.TEXT['confirm_action'] = "Voulez-vous effectuer l'action '";
SM.TEXT['tabs-char'] = "Perso";
SM.TEXT['tabs-ship'] = "Général";
SM.TEXT['tabs-room'] = "Pièce";
SM.TEXT['tabs-chat'] = "Chat";
SM.TEXT['tabs-game'] = "Module";
SM.TEXT['tabs-shop'] = "Achats";
SM.TEXT['SM-added_tab'] = " Attention : Onglet Small(Mush) ";
SM.TEXT['SM-added_tab_text'] = "Cet onglet est un ajout du script Small(Mush). Si un bug venait à se produire ici, il ne pourrait s'agir que d'un bug de script : il ne faudrait alors en avertir que son auteur.";
SM.TEXT['plasma_onmouseover'] = "Bouclier plasma
Le bouclier plasma est activé. Small(Mush) : Licence MIT
Aucune action ne sera faite.";
SM.TEXT['help_screen-B'] = "Cliquez pour cacher l'infobulle.";
SM.TEXT['show_inventory'] = "Afficher l'inventaire";
SM.TEXT['show_flash_inventory'] = "DEBUG : Afficher l'inventaire Flash";
SM.TEXT['editor-tip'] = "Éditeur de messages Small(Mush)
AstroPad
Incendie signalé
Portes signalées
Équipements signalés
Vous êtes ici !";
SM.TEXT['minimap-room'] = "Vous avez sélectionné : rien.";
SM.TEXT['tabtip-chartab'] = "Onglet Personnage
Cet onglet contient toutes les informations sur votre personnage.";
SM.TEXT['tabtip-shiptab'] = "Onglet Vaisseau
Cet onglet contient les informations relatives à l'état et l'avancement du vaisseau : alertes, expédition, projets et recherches terminés.";
SM.TEXT['tabtip-roomtab'] = "Onglet Pièce
Cet onglet contient toutes les informations disponibles sur la pièce dans laquelle vous êtes.";
SM.TEXT['tabtip-chattab'] = "Onglet Chat
Cet onglet comprend le chat et les logs et l'éditeur de messages Small(Mush).";
SM.TEXT['tabtip-gametab'] = "Onglet Module/Flash
Cet onglet contient le jeu Flash et les terminaux auxquels vous accédez, ainsi que la minimap Small(Mush).";
SM.TEXT['tabtip-shoptab'] = "Onglet Distributeur
Cet onglet vous permet d'accéder au distributeur.";
SM.TEXT['buttontip-reload'] = "Rafraîchir
Rafraîchit le jeu pour les actions courantes.";
SM.TEXT['buttontip-help'] = "Aide
Affiche les infobulles (dont certaines récalcitrantes sur mobile) ainsi que de l'aide pour les éléments ajoutés par le script Small(Mush).";
SM.TEXT['chat_bug'] = "Vous êtes sur le canal "; //Espace
SM.TEXT['chat_bug-local'] = "des logs.";
SM.TEXT['chat_bug-mush'] = "Mush.";
SM.TEXT['chat_bug-obj'] = "des objectifs.";
SM.TEXT['chat_bug-wall'] = "principal.";
SM.TEXT['chat_bug-fav'] = "des favoris.";
SM.TEXT['chat_bug-p'] = "privé n°";
SM.TEXT['chat_bug-'] = "INCONNU";
SM.TEXT['copy_logs-button'] = "Logs au format texte";
SM.loadingTexts = [
"Photobirouillage des métaplores…",
"Tir aux poulets intergalactiques…",
"Test chat / micro-ondes…",
"Recherche de Charlie…",
"Tournée d’arrays de bool…",
"Rechargement des blasters à la confiture de queues de cerises…",
"Détraquage du distributeur…",
"Résolution du Mad Kube…",
"Bidulage des trucs…",
"Redémarrage du lutin des annonces vocodées…",
"Localisation des drones…",
"Schématisation des Terminatransistors du PILGRED…",
"Manœuvre d’évitement mouette / réacteur…",
"Vidange des réservoirs d’oxygène…",
"Décapitation des inactifs…",
"Fortification du Jardin hydroponique…",
"Surchauffe des modules persos…",
"Détartrage du matou…",
"Cueillette des champignons…",
"Accélération du rythme de pédalage des bisounours dans le PILGRED…",
"Destruction des denrées non périssables. Vous aviez faim ?…",
"Augmentation du taux d’énervement des Mankarogs…",
"Localisation du chat en cours… Erreur.",
"Cavalier en Baie Alpha. Échec et mat.",
"Nodocéphales détectés. Élimination par capillotractage enclenchée…",
"[HAAaXX] Grésillage du trolley. Cause probable : remplissage du gazomètre.",
"Extinction des consignes lumineuses. Décodage en cours…",
"Dépoussiérage des capsules de cryogénisation…",
"Mise en place des saucisses sur le moteur latéral gauche…",
"Recycleur d’excréments enclenché. Préparation des rations en cours…",
"Boulon, feuille, ciseau ! NÉRON perdu. Simulateur de gravité intact.",
"Arroseurs automatiques : soirée mousse enclenchée.",
"Rupture de café : remplacement par dosettes de cyanure validé.",
"Drone armé terminé. Libération en cours… [HAX]",
"Holoprojection d’asperges dans le réfectoire… [Terminé]",
"Rotation de LAbare de navigation…",
"Schrödinger mort. Cause : l’électron a pris le mauvais chemin…",
"Aaah, la bonne odeur de viande neuro-cryptique…",
"Tu manqueras à personne, sale mutant !",
"Inactifs détectés en couloir. Achat de boules de bowling SNC…",
"Vous autres humains êtes la peste, et nous, nous en sommes l’antidote.",
"Regardez au-delà de la chair, à travers la gélatine de ces yeux de veau mort… et voyez votre ennemi.",
"Éradication des mites en pull-over…",
"Quelqu’un a pensé à s’occuper de la litière de Schrödinger ?…",
"3170. Pour échapper au Mush, un vaisseau à propulsion supraluminique équipé d’un labo haute technologie cryogénise ses passagers et voyage jusqu’aux confins de la galaxie. Mais on peut pas changer de chanson sur le jukebox.",
"Alerte : détection confirmée de vaisseaux hostiles. Ce n’est peut-être pas le meilleur moment pour demander du thé.",
"Les calculs sont pas bons, Kuan Ti !",
"Faites bouillir à la casserole
Une bonne tranche de girolle
Oh, je vais en mettre deux…!",
"Tu quoque mi fungi !",
"Est-ce que tu préfères faire pitié et te véhiculer en patrouilleur, ou commencer très rapidement à te faire du Klix avec moi et pouvoir acquérir cet Icarus haut de gamme ? Moi je pense la question elle est vite répondue.",
"PILGREDspresso… What else?",
"J’ai l’impression qu’il y a de la méfiance dans l’air, petits zumains… Et si on faisait un Cluedo pour détendre l’atmosphère ?",
];
SM.localerooms = ['Pont', 'Baie Alpha', 'Baie Beta', 'Baie Alpha 2', 'Nexus', 'Infirmerie', 'Laboratoire', 'Réfectoire', 'Jardin Hydroponique', 'Salle des moteurs', 'Tourelle Alpha avant', 'Tourelle Alpha centre', 'Tourelle Alpha arrière', 'Tourelle Beta avant', 'Tourelle Beta centre', 'Tourelle Beta arrière', 'Patrouilleur Longane', 'Patrouilleur Jujube', 'Patrouilleur Tamarin', 'Patrouilleur Socrate', 'Patrouilleur Epicure', 'Patrouilleur Platon', 'Patrouilleur Wallis', 'Pasiphae', 'Couloir avant', 'Couloir central', 'Couloir arrière', 'Planète', 'Baie Icarus', 'Dortoir Alpha', 'Dortoir Beta', 'Stockage Avant', 'Stockage Alpha centre', 'Stockage Alpha arrière', 'Stockage Beta centre', 'Stockage Beta arrière', 'Espace infini', 'Les Limbes'];
SM.INTERR = " ?";
break;
case 2: //Anglais
SM.TEXT['SMpageload'] = " Small(Mush) is loading…";
SM.TEXT['stats_perso'] = "Your current statistics: ";
SM.TEXT['AP-general'] = "action point(s)";
SM.TEXT['AP-eng'] = "tech point(s)";
SM.TEXT['AP-garden'] = "gardening point(s)";
SM.TEXT['AP-neron'] = "NERON projects point(s)";
SM.TEXT['AP-comp'] = "IT point(s)";
SM.TEXT['AP-heal'] = "healing point(s)";
SM.TEXT['AP-pilgred'] = "PILGRED point(s)";
SM.TEXT['AP-shoot'] = "shooting point(s)";
SM.TEXT['AP-cook'] = "cooking point(s)";
SM.TEXT['AP-klix'] = "Klix";
SM.TEXT['hide_alert_reports'] = "Hide reports (%1)";
SM.TEXT['show_alert_reports'] = "Show reports (%1)";
SM.TEXT['unvalid_move'] = "This door is broken, you can’t move there!";
SM.TEXT['move_confirm'] = "Do you want to move to ";
SM.TEXT['move_alert'] = "WARNING: it seems that you are not able to move at the moment. An error may display. Continue?";
SM.TEXT['move_guardian'] = "WARNING: someone is guarding this room. Unless you’re Sneaky, you should only move to the room whence you came, else an error may display. Continue?";
SM.TEXT['current_room'] = "You are in: ";
SM.TEXT['move_button'] = "Move to:";
SM.TEXT['broken_door'] = " — BROKEN";
SM.TEXT['door_to'] = "Door → ";
SM.TEXT['SMsettings-title'] = "Small(Mush) settings";
SM.TEXT['SMsettings-islarge'] = "Computer Mode (larger UI, always display chat)";
SM.TEXT['SMsettings-confirm_action'] = "Confirm actions";
SM.TEXT['SMsettings-food_desc'] = "Show the effects of consumables under inventory";
SM.TEXT['SMsettings-forced_locale'] = "Force Small(Mush) language";
SM.TEXT['SMsettings-lang_title'] = "Small(Mush) language:";
SM.TEXT['SMsettings-chat_unload'] = "Unload chat";
SM.TEXT['SMsettings-chat_unload_tip'] = "Unload chat
The main channel will reload faster.
(Sorry for that…)
Please fasten your seat belts.";
SM.TEXT['SMsettings-credits'] = "Script coded by LAbare. MIT licensed.
Spanish translation by CptArgentina and Guilherande (thanks!).";
SM.TEXT['SMsettings-credits_beta'] = " Thanks to the beta team:
LAbare (yeah, why not?)
Heimdall, the only Windows Phone user left on Earth
Breith the Apocalyptic pony
lucasmore, lost in space
Hyomin the creepy cutie
Guilherande, smart as her smartphone
badconker, who coded the chat unloader
Contry the quiet
Bronu, who came back to Sol right in the middle of the beta";
SM.TEXT['confirm_action'] = "Do you want to '";
SM.TEXT['tabs-char'] = "Myself";
SM.TEXT['tabs-ship'] = "Ship";
SM.TEXT['tabs-room'] = "Room";
SM.TEXT['tabs-chat'] = "Chat";
SM.TEXT['tabs-game'] = "Module";
SM.TEXT['tabs-shop'] = "Shop";
SM.TEXT['SM-added_tab'] = " Warning: Small(Mush) tab ";
SM.TEXT['SM-added_tab_text'] = "This tab has been added by the Small(Mush) script. If a bug happens here, it would definitely be a script bug and should be reported only to the author of this script.";
SM.TEXT['plasma_onmouseover'] = "Plasma shield
The plasma shield is active. Small(Mush) — MIT License
This won’t make you do any action.";
SM.TEXT['help_screen-B'] = "Click again to hide the tooltip.";
SM.TEXT['show_inventory'] = "Show inventory";
SM.TEXT['show_flash_inventory'] = "DEBUG: Show Flash inventory";
SM.TEXT['editor-tip'] = "Small(Mush) Message editor
AstroPad
Reported fire
Reported doors
Reported equipments
You are here!";
SM.TEXT['minimap-room'] = "You selected: nothing.";
SM.TEXT['tabtip-chartab'] = "Character tab
This tab contains all the information relative to your character.";
SM.TEXT['tabtip-shiptab'] = "Ship tab
This tab contains all the information relative to the ship in general: current alerts, exploration, projects and researches done…";
SM.TEXT['tabtip-roomtab'] = "Room tab
This tab contains all the information about the room you’re in.";
SM.TEXT['tabtip-chattab'] = "Chat tab
This tab is for the chat and logs, as well as the Small(Mush) message editor.";
SM.TEXT['tabtip-gametab'] = "Game/Terminal tab
This tab contains the Flash game and the terminals you access.";
SM.TEXT['tabtip-shoptab'] = "Vending machine tab
This tab allows you to access the vending machine.";
SM.TEXT['buttontip-reload'] = "Refresh
Refreshes the game like common actions do.";
SM.TEXT['buttontip-help'] = "Help
Displays game tooltips (fixing those who don’t work properly on mobile) as well as the help tooltips for Small(Mush) script additions.";
SM.TEXT['chat_bug'] = "You are in the tab: ";
SM.TEXT['chat_bug-local'] = "logs.";
SM.TEXT['chat_bug-mush'] = "Mush channel.";
SM.TEXT['chat_bug-obj'] = "objectives.";
SM.TEXT['chat_bug-wall'] = "main channel.";
SM.TEXT['chat_bug-fav'] = "favorites.";
SM.TEXT['chat_bug-p'] = "private channel #";
SM.TEXT['chat_bug-'] = "UNKNOWN";
SM.TEXT['copy_logs-button'] = "Logs in text format";
SM.loadingTexts = [
"Photoscamping the scransons…",
"Shooting intergalactic chicken…",
"Cat / microwave experiment in progress…",
"Looking for Waldo…",
"Serving a round of read bools…",
"Reloading blasters with cherry stalk jam…",
"Out-of-servicing the vending machine…",
"Solving the Kube…",
"Thinging thingys…",
"Rebooting the vocoded announcements fairy…",
"Locating drones…",
"Mapping PILGRED Terminatransistors…",
"Avoiding seagull / reactor collision…",
"Emptying oxygen tanks…",
"Beheading inactives…",
"Adding ramparts to the Hydroponic garden…",
"Overheating PDAs…",
"Performing a comb sort on the kitty’s fur…",
"Stalking mushrooms…",
"Boosting the PILGRED elves…",
"Destroying non-perishable rations. My apologies if you were hungry…",
"Tickling Mankarogs…",
"Locating the cat… Error.",
"Knight in Alpha Bay. Checkmate.",
"Curmudgeons detected aboard. Triggering death by discombobulation…",
"[HAAaXX] Going off my trolley… Probable cause: tanking up.",
"Turning off cabin lights. Starting cipher analysis…",
"Blowing the dust off the Cryosleep capsules…",
"Grilling sausages on the left lateral reactor…",
"Feces recycler activated. Baking rations…",
"Bolt, paper, scissors! NERON lost. Gravity Simulator still running.",
"Automatic sprinklers announcement: wet shirt contest is a go!",
"Coffee shortage: authorizing replacement by cyanure capsules…",
"Killer drone completed. Allowing ship-wide access… [HAX]",
"Holoprojecting asparagus in the refectory… [Done]",
"Schrödinger died. Cause: the electron took the route B…",
"Nothing like the smell of new neuro-cryptic meat…",
"Thanks for standing still, inactive!",
"Inactives detected in the corridors. Buying SNC bowling balls…",
"You humans are a plague, and we are the cure.",
"Look past the flesh, look through the soft gelatin of these dull cow eyes… and see your enemy.",
"Melting meat popsicles…",
"Who’s in charge of cleaning Schrödinger’s litter box?…",
"3170. To escape the Mush, a ship going faster than light, hosting a state of the art lab and 16 cryogenized crewmembers warps to the farthest reaches of the galaxy. And you can’t even choose the song that plays on the jukebox.",
"Warning: hostile ships detected. Now may not be a great time to ask for a cup of tea.",
"“Don’t tell me; we’re about to meet a huge hunter wave.”
“Yup.”
“All Trax and no lenses?”
“Most likely.”
“Bring it on.”",
"Tu quoque mi fungi!",
"Since the dawn of time immemorial, humans have wondered, “What happened before the beginning of history?” The answer… is “fungus, mostly”. Unfortunately, the mycorrhicene era has ended, giving way to the meatier, louder, and less efficient anthropocene. But what if I told you—we could bring it back? (shoots you with a spore dart)",
"Then Andie opened their eyes, and it turned out it was all just a dream… Reality was in fact much, much worse.",
"Science fact: Mushocondria is the spowerhouse of the cell.",
"You hoomans seem a bit tense and wary. A team building exercise wouldn’t hurt! How about a good old murder mystery party?",
];
SM.localerooms = ['Bridge', 'Alpha Bay', 'Bravo Bay', 'Alpha Bay 2', 'Nexus', 'Medlab', 'Laboratory', 'Refectory', 'Hydroponic Garden', 'Engine Room', 'Front Alpha Turret', 'Centre Alpha Turret', 'Rear Alpha Turret', 'Front Bravo Turret', 'Centre Bravo Turret', 'Rear Bravo Turret', 'Patrol Ship Tomorrowland', 'Patrol Ship Olive Grove', 'Patrol Ship Yasmin', 'Patrol Ship Wolf', 'Patrol Ship E-Street', 'Patrol Ship Eponine', 'Patrol Ship Carpe Diem', 'Pasiphae', 'Front Corridor', 'Central Corridor', 'Rear Corridor', 'Planet', 'Icarus Bay', 'Alpha Dorm', 'Bravo Dorm', 'Front Storage', 'Centre Alpha Storage', 'Rear Alpha Storage', 'Centre Bravo Storage', 'Rear Bravo Storage', 'Outer Space', 'Limbo'];
SM.INTERR = "?";
break;
case 3: //Espagnol
SM.TEXT['SMpageload'] = " Small(Mush) is loading…";
SM.TEXT['stats_perso'] = "Tus estadísticas actuales: ";
SM.TEXT['AP-general'] = "punto(s) de acción";
SM.TEXT['AP-eng'] = "punto(s) de reparación";
SM.TEXT['AP-garden'] = "punto(s) de jardinería";
SM.TEXT['AP-neron'] = "punto(s) de artífice";
SM.TEXT['AP-comp'] = "punto(s) de informática";
SM.TEXT['AP-heal'] = "punto(s) de acción cura";
SM.TEXT['AP-pilgred'] = "punto(s) de PILGRED";
SM.TEXT['AP-shoot'] = "punto(s) de disparo";
SM.TEXT['AP-cook'] = "punto(s) de cocina";
SM.TEXT['AP-klix'] = "Klix";
SM.TEXT['hide_alert_reports'] = "Esconder reportes (%1)";
SM.TEXT['show_alert_reports'] = "Mostrar reportes (%1)";
SM.TEXT['unvalid_move'] = "¡Esta puerta está rota, no puedes desplazarte allí!";
SM.TEXT['move_confirm'] = "¿Quieres desplazarte a ";
SM.TEXT['move_alert'] = "CUIDADO : Parece que no puedes desplazarte en este momento. Puede que haya un error. ¿Continuar?";
SM.TEXT['move_guardian'] = "CUIDADO : Alguien está vigilando esta habitación. A menos que seas Huidizo, solo puedes moverte a la habitación por la cual viniste, puede que haya un error. ¿Continuar?";
SM.TEXT['current_room'] = "Estás en : ";
SM.TEXT['move_button'] = "Desplazare a :";
SM.TEXT['broken_door'] = " — ROTA";
SM.TEXT['door_to'] = "Puerta → ";
SM.TEXT['SMsettings-title'] = "Parámetros de Small(Mush)";
SM.TEXT['SMsettings-islarge'] = "Computer Mode";
SM.TEXT['SMsettings-confirm_action'] = "Confirmar acciones";
SM.TEXT['SMsettings-food_desc'] = "Mostrar efectos de consumibles bajo el inventario";
SM.TEXT['SMsettings-forced_locale'] = "Forzar cambio de idioma de Small(Mush)";
SM.TEXT['SMsettings-lang_title'] = "Idioma de Small(Mush):";
SM.TEXT['SMsettings-chat_unload'] = "Limpiar el chat";
SM.TEXT['SMsettings-chat_unload_tip'] = "Limpiar el chat
El canal principal tardará menos en recargar";
SM.TEXT['SMsettings-chat_unload_reload'] = "¡Recarga forzosa inminente!
(Lo siento por eso...)
Por favor ajusten sus cinturones.";
SM.TEXT['SMsettings-credits'] = "Script desarrollado por LAbare. Licencia MIT.
Traducción al Español por CptArgentina y Guilherande (¡de nada!).";
SM.TEXT['SMsettings-credits_beta'] = " Gracias al equipo de la beta:
LAbare (¿sí, por qué no?)
Heimdall, rechazado por todos, inclusive Windows
Breith el pony apocalíptico
lucasmore, perdido en el espacio
Hyomin, la dulzura aterradora
Guilherande, la mas beta de los probadores
badconker, programador del limpiador del chat
Contry la callada
Bronu, quien volvió al SS justo en el medio de la beta";
SM.TEXT['confirm_action'] = "¿Quieres '";
SM.TEXT['tabs-char'] = "Yo";
SM.TEXT['tabs-ship'] = "Nave";
SM.TEXT['tabs-room'] = "Sala";
SM.TEXT['tabs-chat'] = "Chat";
SM.TEXT['tabs-game'] = "Módulo";
SM.TEXT['tabs-shop'] = "Tienda";
SM.TEXT['SM-added_tab'] = " Atención: Pestaña de Small(Mush) ";
SM.TEXT['SM-added_tab_text'] = "Esta pestaña es añadida por el script Small(Mush). Si un bug es encontrado aquí, definitivamente es un bug del script y debería ser reportado únicamente al autor del script";
SM.TEXT['plasma_onmouseover'] = "Escudo de plasma
El escudo de plasma está activo. Small(Mush) — Licencia MIT
Esto no te hará cometer ninguna acción.";
SM.TEXT['help_screen-B'] = "Haz click de nuevo para esconder el tooltip.";
SM.TEXT['show_inventory'] = "Monstrar inventario";
SM.TEXT['show_flash_inventory'] = "DEBUG: Mostrar inventario de Flash";
SM.TEXT['editor-tip'] = "Editor de mensajes de Small(Mush)
AstroPad
Incendio reportado
Puertas reportadas
Equipamientos reportados
¡Tú estás aquí!";
SM.TEXT['minimap-room'] = "Tu seleccionaste: nada";
SM.TEXT['tabtip-chartab'] = "Pestaña Personaje
Contiene toda la información relativa a tu personaje.";
SM.TEXT['tabtip-shiptab'] = "Pestaña Nave
Contiene toda la información relativa a la nave en general: alertas, expediciones, proyectos, etc.";
SM.TEXT['tabtip-roomtab'] = "Pestaña Sala
Contiene toda la información relativa a la sala en la que estás.";
SM.TEXT['tabtip-chattab'] = "Pestaña Chat
Contiene el chat,registros y el editor de mensajes de Small(Mush).";
SM.TEXT['tabtip-gametab'] = "Pestaña Módulo
Contiene el juego de Flash y las terminales a las que accedes.";
SM.TEXT['tabtip-shoptab'] = "Pestaña Tienda
Te permite acceder a la máquina expendedora.";
SM.TEXT['buttontip-reload'] = "Recargar
Recarga el juego como lo hacen las acciones normales.";
SM.TEXT['buttontip-help'] = "Ayuda
Muestra tooltips,inclyendo algunos que no funcionan correctamente desde un teléfono y otros sobre adiciones de Small(Mush).";
SM.TEXT['chat_bug'] = "Estás en la pestaña: ";
SM.TEXT['chat_bug-local'] = "registros.";
SM.TEXT['chat_bug-mush'] = "canal Mush.";
SM.TEXT['chat_bug-obj'] = "objetivos.";
SM.TEXT['chat_bug-wall'] = "canal principal.";
SM.TEXT['chat_bug-fav'] = "favoritos.";
SM.TEXT['chat_bug-p'] = "canal privado #";
SM.TEXT['chat_bug-'] = "DESCONOCIDO";
SM.TEXT['copy_logs-button'] = "Registros en formato de texto";
SM.loadingTexts = ["Experimento gato/microondas en progreso…",
"Recargando blasters con mermelada de tallos de cereza…",
"Máquina expendedora fuera de servicio…",
"Resolviendo el Kubo…",
"Coseando cosas…",
"Reiniciado el hada de los anuncios vocodificados…",
"Localizando drones…",
"Mapeando Terminatransmisores PILGRED…",
"Evitando colisión gaviota/reactor…",
"Vacíando tanques de oxígeno…",
"Decapitando inactivos…",
"Disparando a gallinas intergalácticas…",
"Buscando a Wally…",
"Fortificando el Jardín hidropónico…",
"Sobrecalentando PDAs…",
"Limpiando los dientes del minino…",
"Recolectando hongos…",
"Destruyendo raciones no-perecibles. No tenías hambre, ¿verdad?…",
"Incrementando nivel de irritación de los Mankarog…",
"Caballo a Plataforma Alpha. Jaque mate.",
"Colocando salchicas en el reactor lateral izquierdo…",
"Reciclador de heces activado. Cocinando raciones…",
"¡Piedra, papel, circuito! Neron pierde. Simulador de gravedad (aún no) roto.",
"Regaderas automáticas: concurso de camisetas mojadas iniciando.",
"Escasez de café: validando uso de cápsulas de cianuro…",
"Permitiendo acceso completo a la nave al dron asesino... [HAX]",
"Proyectando hologramas de esparragos en el comedor… [Listo]",
"Acelerando el ritmo de pedaleo de los Ositos Pilgredositos…",
"Error cuatrocientos-gato…",
"Apagando luces. Comenzando análisis del código…",
"Desempolvando capsulas de Cryoletárgo…",
"Yendo AL bare…",
"Schrödinger murió. Causa: El electrón tomó la ruta B…",
"Ah, nada como el olor a carne neuro-críptica nueva…",
"Inactivos detectados en el pasillo. Compra de bolas de bolos SNC…",
];
SM.localerooms = ['Puente de mando', 'Plataforma Alpha', 'Plataforma Beta', 'Plataforma Alpha 2', 'Nexus', 'Enfermería', 'Laboratorio', 'Comedor', 'Jardín Hidropónico', 'Sala de motores', 'Cañón Alpha delantero', 'Cañón Alpha central', 'Cañón Alpha trasero', 'Cañón Beta delantero', 'Cañón Beta central', 'Cañón Beta trasero', 'Patrullero Longane', 'Patrullero Jujube', 'Patrullero Tamarindo', 'Patrullero Sócrates', 'Patrullero Epicuro', 'Patrullero Platón', 'Patrullero Wallis', 'Pasiphae', 'Pasillo delantero', 'Pasillo central', 'Pasillo trasero', 'Planeta', 'Icarus', 'Dormitorio Alpha', 'Dormitorio Beta', 'Almacén delantero', 'Almacén Alpha central', 'Almacén Alpha trasero', 'Almacén Beta central', 'Almacén Beta trasero', 'Espacio infinito', 'El limbo'];
SM.INTERR = "?";
break;
}
cb();
};
/* FONCTION D'INITIALISATION */
SM.init = function() {
var inlineJS = "document.body.setAttribute('data-SM-src', _tid.makeUrl('/mod/wall/post', { _id: 'tabreply_content', jsm: '1', lang: 'FR' })); Main.SMupdtArr = ['maincontainer'];";
SM.addNewEl('script', document.head, null, inlineJS); //Compatibilité avec userscript, sinon _tid.makeUrl est inaccessible et Main.SMupdtArr ne marche pas
SM.AstroPadLoaded = false;
SM.inventoryOpen = false;
SM.currentTarget = null;
if (SM.sel('#SMbar') == null) {
SM.initCss();
SM.initMenubar();
SM.initTabs();
}
SM.charTab();
SM.shipTab();
SM.roomTab();
SM.chatTab();
SM.gameTab();
SM.topStats();
SM.messageEditor();
SM.astroTab();
SM.changeActionFunctions();
window.setTimeout(function() { SM.sel('#content').scrollLeft = 0; }, 500);
// Computer Mode
if (SM.settings['islarge']) {
document.body.setAttribute('data-islarge', 'true');
SM.sel('#chat_col').style.display = 'table-cell';
}
//Première fois : alerte à lire
if (SM.settings['first_time']) {
var SMdialog = SM.copyEl(SM.sel('#dialog'), document.body);
SMdialog.style.display = 'block';
SMdialog.style.left = '12px !important';
SMdialog.style.top = '100px';
SM.sel('#SMdialog_title').innerHTML = " " + SM.TEXT['warning-title'];
SM.addNewEl('p', SM.sel('#SMdialog_body'), null, SM.TEXT['warning-1']);
SM.addNewEl('p', SM.sel('#SMdialog_body'), null, SM.TEXT['warning-2']);
SM.addNewEl('p', SM.sel('#SMdialog_body'), null, SM.TEXT['warning-3']);
SM.sel('#SMdialog_ok').addEventListener('click', function() { document.body.removeChild(SM.sel('#SMdialog')); });
SM.settings['first_time'] = false;
SM.setSMsettings();
}
//Le rechargement interne de la page écrase les modifications et ajouts, donc on fait une vérification régulière
window.setInterval(function() {
if (!SM.sel('#SMenergybar')) {
SM.reInit();
}
}, 500);
};
exportFunction(SM.toArray, unsafeSM, { defineAs: "toArray" });
exportFunction(SM.sel, unsafeSM, { defineAs: "sel" });
exportFunction(SM.selAll, unsafeSM, { defineAs: "selAll" });
exportFunction(SM.getAttributesDict, unsafeSM, { defineAs: "getAttributesDict" });
exportFunction(SM.addNewEl, unsafeSM, { defineAs: "addNewEl" });
exportFunction(SM.addButton, unsafeSM, { defineAs: "addButton" });
exportFunction(SM.moveEl, unsafeSM, { defineAs: "moveEl" });
exportFunction(SM.copyEl, unsafeSM, { defineAs: "copyEl" });
exportFunction(SM.getTipContent, unsafeSM, { defineAs: "getTipContent" });
exportFunction(SM.reformat, unsafeSM, { defineAs: "reformat" });
exportFunction(SM.generateMinimap, unsafeSM, { defineAs: "generateMinimap" });
exportFunction(SM.changeTab, unsafeSM, { defineAs: "changeTab" });
exportFunction(SM.SMhelp, unsafeSM, { defineAs: "SMhelp" });
exportFunction(SM.toggleAlertList, unsafeSM, { defineAs: "toggleAlertList" });
exportFunction(SM.changeRoom, unsafeSM, { defineAs: "changeRoom" });
exportFunction(SM.displayRoomActions, unsafeSM, { defineAs: "displayRoomActions" });
exportFunction(SM.updateRoomActions, unsafeSM, { defineAs: "updateRoomActions" });
exportFunction(SM.changeChatTab, unsafeSM, { defineAs: "changeChatTab" });
exportFunction(SM.SMexitModule, unsafeSM, { defineAs: "SMexitModule" });
exportFunction(SM.changeActionFunctions, unsafeSM, { defineAs: "changeActionFunctions" });
exportFunction(SM.beforeAction, unsafeSM, { defineAs: "beforeAction" });
exportFunction(SM.hidePaste, unsafeSM, { defineAs: "hidePaste" });
exportFunction(SM.loadingScreen, unsafeSM, { defineAs: "loadingScreen" });
exportFunction(SM.reInit, unsafeSM, { defineAs: "reInit" });
exportFunction(SM.showLicense, unsafeSM, { defineAs: "showLicense" });
exportFunction(SM.selectItem, unsafeSM, { defineAs: "selectItem" });
exportFunction(SM.itemLeft, unsafeSM, { defineAs: "itemLeft" });
exportFunction(SM.itemRight, unsafeSM, { defineAs: "itemRight" });
exportFunction(SM.getSMsettings, unsafeSM, { defineAs: "getSMsettings" });
exportFunction(SM.setSMsettings, unsafeSM, { defineAs: "setSMsettings" });
exportFunction(SM.buildSettingsMenu, unsafeSM, { defineAs: "buildSettingsMenu" });
exportFunction(SM.initCss, unsafeSM, { defineAs: "initCss" });
exportFunction(SM.initMenubar, unsafeSM, { defineAs: "initMenubar" });
exportFunction(SM.initTabs, unsafeSM, { defineAs: "initTabs" });
exportFunction(SM.charTab, unsafeSM, { defineAs: "charTab" });
exportFunction(SM.shipTab, unsafeSM, { defineAs: "shipTab" });
exportFunction(SM.roomTab, unsafeSM, { defineAs: "roomTab" });
exportFunction(SM.chatTab, unsafeSM, { defineAs: "chatTab" });
exportFunction(SM.gameTab, unsafeSM, { defineAs: "gameTab" });
exportFunction(SM.topStats, unsafeSM, { defineAs: "topStats" });
exportFunction(SM.messageEditor, unsafeSM, { defineAs: "messageEditor" });
exportFunction(SM.refreshPreview, unsafeSM, { defineAs: "refreshPreview" });
exportFunction(SM.savePreview, unsafeSM, { defineAs: "savePreview" });
exportFunction(SM.retrievePreview, unsafeSM, { defineAs: "retrievePreview" });
exportFunction(SM.buildMessage, unsafeSM, { defineAs: "buildMessage" });
exportFunction(SM.preformatPlanet, unsafeSM, { defineAs: "preformatPlanet" });
exportFunction(SM.astroTab, unsafeSM, { defineAs: "astroTab" });
exportFunction(SM.locale, unsafeSM, { defineAs: "locale" });
exportFunction(SM.init, unsafeSM, { defineAs: "init" });
/* VARIABLES */
//SM.src = "http://labare.net/SmallMush/";
SM.src = "http://labare.github.io/SmallMush/";
SM.smileys = [['pa_pm', 'pslots.png'], ['pa', 'pa_slot1.png'], ['pm', 'pa_slot2.png'], ['pv|hp', 'lp.png'], ['xp', 'xp.png'], ['xpbig', 'xpbig.png'], ['pa_heal', 'pa_heal.png'], ['asocial', 'status/unsociable.png'], ['disabled', 'status/disabled.png'], ['hungry', 'status/hungry.png'], ['hurt', 'status/hurt.png'], ['ill', 'status/disease.png'], ['psy_disease', 'status/psy_disease.png'], ['commander', 'title_01.png'], ['admin_neron', 'title_02.png'], ['resp_comm', 'title_03.png'], ['alert', 'alert.png'], ['com', 'comm.png'], ['door', 'door.png'], ['plant_youngling', 'plant_youngling.png'], ['plant_thirsty', 'plant_thirsty.png'], ['plant_dry', 'plant_dry.png'], ['plant_diseased', 'plant_diseased.png'], ['bin', 'bin.png'], ['next', 'pageright.png'], ['ship_triumph', 'daedalus_triumph.png'], ['pa_comp', 'pa_comp.png'], ['pa_cook', 'pa_cook.png'], ['pa_core', 'pa_core.png'], ['pa_eng|eng', 'pa_eng.png'], ['pa_garden', 'pa_garden.png'], ['pa_pilgred', 'pa_pilgred.png'], ['pa_shoot', 'pa_shoot.png'], ['laid', 'status/laid.png'], ['mastered', 'status/mastered.png'], ['mush', 'mush.png'], ['stink', 'status/stinky.png'], ['fuel', 'fuel.png'], ['o2', 'o2.png'], ['moral|pmo', 'moral.png'], ['eat', 'sat.png'], ['pills', 'demoralized2.png'], ['dead', 'dead.png'], ['hunter', 'hunter.png'], ['fire', 'fire.png'], ['more', 'more.png'], ['less', 'less.png'], ['chut', 'discrete.png'], ['talk', 'talk.gif'], ['talky', 'talkie.png'], ['cat', 'cat.png'], ['time', 'casio.png'], ['tip', 'tip.png'], ['triumph', 'triumph.png']];
SM.ME_NERON = false;
SM.ME_ALONE = true;
SM.ME_MODULING = false;
SM.GUARDIAN = false;
SM.GRAVITY = true;
/** INITIALISATION **/
var SMpageload;
var startInterval = setInterval(function() { //Pour ne pas empêcher le chargement de l'userscript sur les connexions lentes/data à la traîne
if (document.body) {
SMpageload = document.createElement('div');
SMpageload.setAttribute('id', 'SMpageload');
SMpageload.innerHTML = " Small(Mush)…";
SMpageload.style.position = 'fixed';
SMpageload.style.top = '40px';
SMpageload.style.left = '10px';
SMpageload.style.border = '2px solid white';
SMpageload.style.backgroundColor = 'black';
SMpageload.style.padding = '4px';
document.body.appendChild(SMpageload);
}
if (SM.sel('#cdBottomBlock')) {
clearInterval(startInterval);
document.body.removeChild(SMpageload);
if (SM.isUserscript) {
Main = unsafeWindow.Main || Main;
}
if (!SM.sel('#SMbar')) {
SM.getSMsettings();
SM.locale(SM.init);
}
}
}, 500);