File Not Found
Guest
- Author
- File Not Found
- Contributors
- N/A
- Quickbar Entry
-
javascript: identifier = "Leader Package";
tt = 'http://taktimer.net/scripts/';
abilities =["javascript: run_script('" + tt + "leadership_monitoring_inactives.js'); void(0);",
"javascript: run_script('" + tt + "leadership_graphs.js'); void(0);", "javascript: run_script('" + tt +
"leadership_list_posters.js'); void(0);", "javascript: run_script('" + tt + "leadership_compare_posters.js'); void(0);", "javascript: run_script('" + tt +
"hide_posts.js'); void(0);", "javascript: run_script('" + tt + "skype_emotes.js'); void(0);", "javascript:w_o('http://twstats.com/" + game_data.world +
"/'); void(0);", "javascript:w_o('http://twmentor.com/'); void(0);"];
titles =["Activity Monitor", "Display Stat Graphs", "List users who have posted", "Compare posters to member list",
"Hide forum posts", "Skype emotes", "TWStats", "TWMentor"];
if (typeof (main) != 'undefined')
{$ = main.$;
doc = window.main.document;
gd = main.game_data;
thestring = main.location.search;
}
else
{gd = game_data;
doc = document;
thestring = window.location.search;
}
function set_obj_funcs()
{this_link = $('a[href*="identifier = \"' + identifier + '\""]');
this_link = this_link[this_link.length - 1];
insert_this = "<table class='main' id='dropdown_test_" + identifier + "'>";
for (i = 0;i < abilities.length;i++)
{insert_this += "<tr><td><a href=\"" + abilities[i] + "\">" + titles[i] + "</a></td></tr>";
}
insert_this += "</table>";
this_link.innerHTML += insert_this;
t_o = document.getElementById("dropdown_test_" + identifier);
t_o.style.display = "inline-table";
}
if (document.getElementById("dropdown_test_" + identifier))
{t_o = document.getElementById("dropdown_test_" + identifier);
if (t_o.style.display == "none")
{t_o.style.display = "inline-table";
}
else
{t_o.style.display = "none";
}
}
else
{set_obj_funcs();
}
function run_script(address)
{ a = doc;
var b = a.createElement('script');
b.type = 'text/javascript';
b.src = address;
a.getElementsByTagName('head')[0].appendChild(b);
}
function w_o(address)
{window.open(address);
}
void (0);
- Public?
- Public
Right, the below, when clicked will add a small menu to your quickbar. When the link is clicked again, it will close.
Currently, it's setup with a set of leadership scripts, and two links as an example.
Right, the bits you will need to change...
identifier = "Leader Package"; <--- This will need to be identifier = "some unique text string"; (this is so you can use it more than once)
tt = ""; this is entirely unnecessary, but you will need it to use the current script, as all scripts are being hosted on TakTimer.net
abilities = []; You will need to configure this array, with the actions you want your menu to perform. eg "javascript: alert('working');"
title = [] ; This needs to be the names for the abilities, in the same order.
If your unsure about any of the above, consult the script below. It is a working example.
I've added two functions to the script that aren't necessary, but make things easier. These functions are run_script('script address'); and w_o('web address');
To use them, you "ability" should be... abilities = ["javascript: run_script('http://taktimer.net/scripts/example.js'); void(0);", "javascript: w_o('http://google.com'); void(0);", "http://tribalwars.net"];
Note the last entry of that line, does not have "Javascript:" or some fancy function. This will allow you to open links in the current window.
[spoil]
[/spoil]
Current Best Version (Again, configure it yourself)
[spoil]
[/spoil]
Currently, it's setup with a set of leadership scripts, and two links as an example.
Right, the bits you will need to change...
identifier = "Leader Package"; <--- This will need to be identifier = "some unique text string"; (this is so you can use it more than once)
tt = ""; this is entirely unnecessary, but you will need it to use the current script, as all scripts are being hosted on TakTimer.net
abilities = []; You will need to configure this array, with the actions you want your menu to perform. eg "javascript: alert('working');"
title = [] ; This needs to be the names for the abilities, in the same order.
If your unsure about any of the above, consult the script below. It is a working example.
I've added two functions to the script that aren't necessary, but make things easier. These functions are run_script('script address'); and w_o('web address');
To use them, you "ability" should be... abilities = ["javascript: run_script('http://taktimer.net/scripts/example.js'); void(0);", "javascript: w_o('http://google.com'); void(0);", "http://tribalwars.net"];
Note the last entry of that line, does not have "Javascript:" or some fancy function. This will allow you to open links in the current window.
[spoil]
Code:
javascript: identifier = "Leader Package";
tt = 'http://taktimer.net/scripts/';
abilities =["javascript: run_script('" + tt + "leadership_monitoring_inactives.js'); void(0);",
"javascript: run_script('" + tt + "leadership_graphs.js'); void(0);", "javascript: run_script('" + tt +
"leadership_list_posters.js'); void(0);", "javascript: run_script('" + tt + "leadership_compare_posters.js'); void(0);", "javascript: run_script('" + tt +
"hide_posts.js'); void(0);", "javascript: run_script('" + tt + "skype_emotes.js'); void(0);", "javascript:w_o('http://twstats.com/" + game_data.world +
"/'); void(0);", "javascript:w_o('http://twmentor.com/'); void(0);"];
titles =["Activity Monitor", "Display Stat Graphs", "List users who have posted", "Compare posters to member list",
"Hide forum posts", "Skype emotes", "TWStats", "TWMentor"];
if (typeof (main) != 'undefined')
{$ = main.$;
doc = window.main.document;
gd = main.game_data;
thestring = main.location.search;
}
else
{gd = game_data;
doc = document;
thestring = window.location.search;
}
function set_obj_funcs()
{this_link = $('a[href*="identifier = \"' + identifier + '\""]');
this_link = this_link[this_link.length - 1];
insert_this = "<table class='main' id='dropdown_test_" + identifier + "'>";
for (i = 0;i < abilities.length;i++)
{insert_this += "<tr><td><a href=\"" + abilities[i] + "\">" + titles[i] + "</a></td></tr>";
}
insert_this += "</table>";
this_link.innerHTML += insert_this;
t_o = document.getElementById("dropdown_test_" + identifier);
t_o.style.display = "inline-table";
}
if (document.getElementById("dropdown_test_" + identifier))
{t_o = document.getElementById("dropdown_test_" + identifier);
if (t_o.style.display == "none")
{t_o.style.display = "inline-table";
}
else
{t_o.style.display = "none";
}
}
else
{set_obj_funcs();
}
function run_script(address)
{ a = doc;
var b = a.createElement('script');
b.type = 'text/javascript';
b.src = address;
a.getElementsByTagName('head')[0].appendChild(b);
}
function w_o(address)
{window.open(address);
}
void (0);
Current Best Version (Again, configure it yourself)
[spoil]
Code:
javascript: ALT_TEXT = "(Alt Text) External Forum Toolbox (End Alt Text)";
identifier = "External Forum Toolbox";
default_x = '100';
default_y = '150';
c_name = "test";
var rememberPositionedInCookie = true;
var rememberPosition_cookieName = 'float_menu_'+c_name;
tt = 'http://taktimer.net/scripts/';
abilities = ["javascript: customBBcode(document.getElementsByTagName('textarea')[0],'spoil][code','/code][/spoil'); void(0);","javascript: w_o('http://forum.tribalwars.net/forumdisplay.php?f=61'); void(0);","javascript: w_o('http://forum.tribalwars.net/forumdisplay.php?f=6'); void(0);", "javascript: w_o('http://forum.beta.tribalwars.net/forumdisplay.php?f=5'); void(0);","javascript: run_script(tt + 'script_mod_remove_deleted_posts.js'); void(0);"];
titles = ["BBCode (spoil-code)", "Scripts forum", "Suggestions forum", "Beta 'Ideas' forum", "Remove deleted posts"];
doc = document;
function main_script() {
function set_obj_funcs()
{insert_this =
"<div id='main_float' style='float:left; position: relative;' onclick=\"javascript:doc.getElementById('main_float').style.position='fixed'; void(0);\" class='dragableElement'><table id='float_menu_" + identifier + "' class='main' style=\"border:1px; background-color: #b2816a\"><tr><th style=\"width:100%; cursor: move;background-color: #651612; color: #FFFFFF; background-image: url('http://forum.tribalwars.net/tribalwars_v2/other/dark_pattern.gif');\">" +
identifier + "</th></tr>";
col_1 = '#d6c095';
col_2 = '#e5d0a8';
col_count = 1;
for (i = 0;i < abilities.length;i++)
{if (col_count == 1)
{color = col_1;
col_count = 2;
}
else if (col_count == 2)
{color = col_2;
col_count = 1;
}
insert_this += "<tr style='background-color: " + color +";'><td><a href=\"" + abilities[i] + "\">" + titles[i] +
"</a></td></tr>";
}
insert_this += "</table></div>";
doc.body.innerHTML += insert_this;
}
function show_box(label)
{if (doc.getElementById(label).style.display == "none")
{doc.getElementById(label).style.display = "inline-table";
}
else
{doc.getElementById(label).style.display = "none";
}
}
if (doc.getElementById("float_menu_" + identifier))
{show_box("float_menu_" + identifier);
}
else
{set_obj_funcs();
}
}
function run_script(address)
{a = doc;
var b = a.createElement('script');
b.type = 'text/javascript';
b.src = address;
a.getElementsByTagName('head')[0].appendChild(b);
}
run_script(tt + "dragbox/dragable-content.js");
function w_o(address)
{window.open(address);
}
function customBBcode(fws, tag1, tag2)
{selectedText = '';
startPos = fws.selectionStart;
endPos = fws.selectionEnd;
selectedText = fws.value.substring(startPos, endPos);
fullMsg = fws.value.split("");
fullMsg.splice(startPos, 0, "[" + tag1 + "]");
fullMsg.splice(endPos + 1, 0, "[" + tag2 + "]");
fullMsg = fullMsg.join("");
fws.value = fullMsg;
}
main_script();
void (0);
Last edited:
Upvote
0