Misc Submenu's from quickbar

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]
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);
[/spoil]



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);
[/spoil]
 
Last edited:
Upvote 0

File Not Found

Guest
Are you able to be more clear about what you mean?

By popup, are you refering to it openning in a new window?
 

DeletedUser

Guest
Yes (technically) and no (visually) - just like the TakTimer messages.
 

File Not Found

Guest
So literally a floating menu...

I will see what I can do.
 

File Not Found

Guest
Right, the below is entirely experimental, and alot of the code is pulled from brainjar.

Let me know what you think. Setup is entirely the same.

[spoil]
Code:
javascript: ALT_TEXT = "(Alt Text) Leader Package (Floating - 1) (End Alt Text)";
identifier = "Leader Package - Floating(1)";
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 = 
      "<div id=\"boxB_Top_"+identifier+"\" class=\"files_box\" style=\"left:400px;top:150px;\">  <div class=\"bar\" style=\"width:100%;\"   onmousedown=\"dragStart(event, 'boxB_Top_"+identifier+"')\">" + 
      identifier + 
      "&nbsp&nbsp&nbsp&nbsp&nbsp <a href=\"javascript: show_box('boxB_"+identifier+"'); void(0);\">Show / Hide </a></div>  <div id=\"boxB_" + identifier+"\" class=\"content\" style=\"width:100%;\"<table class='main'>";
    for (i = 0;i < abilities.length;i++)
       {insert_this += "<tr><td><a href=\"" + abilities[i] + "\">" + titles[i] + "</a></td></tr>";
       }
    insert_this += "</table></div>";
    doc.getElementById("content_value").innerHTML += insert_this;
   }

function addCss(cssCode)
   {var styleElement = document.createElement("style");
    styleElement.type = "text/css";
    if (styleElement.styleSheet)
       {styleElement.styleSheet.cssText = cssCode;
       }
    else 
       {styleElement.appendChild(document.createTextNode(cssCode));
       }
    document.getElementsByTagName("head")[0].appendChild(styleElement);
   }

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);
   }

css_insert1 = ".files_box {\n  background-color: transparent;\n   color: #000000;\n  padding: 0px;\n  position: absolute;\n}\n\n";

css_insert2 =".bar {\n  background-color: #70211C;\n  color: #ffffff;\n  cursor: move;\n  font-weight: bold;\n}\n\n.bar A:link {color: #FFFFFF;}";

css_insert3 =".content {\n  background-color:transparent;}\n\n";

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 (document.getElementById("boxB_" + identifier))
   {if (doc.getElementById("boxB_" + identifier).style.display == "none")
       {doc.getElementById("boxB_" + identifier).style.display = "inline-table";
       }
    else 
       {doc.getElementById("boxB_" + identifier).style.display = "none";
       }
   }
else 
   {run_script(tt + "dragbox/dragbox.js");
    addCss(css_insert1);
    addCss(css_insert2);
    addCss(css_insert3);
    set_obj_funcs();
   }
void (0);
[/spoil]

[spoil]
Code:
javascript: ALT_TEXT = "(Alt Text) Leader Package (Floating - 2) (End Alt Text)";
identifier = "Leader Package - Floating(2)";
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 = "<div id=\"boxB_Top_" + identifier + 
      "\" class=\"files_box\" style=\"left:400px;top:150px;\">  <div class=\"bar\" style=\"width:100%;\"   onmousedown=\"dragStart(event, 'boxB_Top_" + 
      identifier + "')\">" + identifier + "&nbsp&nbsp&nbsp&nbsp&nbsp <a href=\"javascript: show_box('boxB_" + 
      identifier + 
      "'); void(0);\"><img src=\"http://en53.tribalwars.net/graphic/login_close.png\" align=\"top-right\"></img> </a></div>  <div id=\"boxB_" + 
      identifier + "\" class=\"content\" style=\"width:100%;\"<table class='main'>";
    for (i = 0;i < abilities.length;i++)
       {insert_this += "<tr><td><a href=\"" + abilities[i] + "\">" + titles[i] + "</a></td></tr>";
       }
    insert_this += "</table></div>";
    doc.getElementById("content_value").innerHTML += insert_this;
   }

function addCss(cssCode)
   {var styleElement = document.createElement("style");
    styleElement.type = "text/css";
    if (styleElement.styleSheet)
       {styleElement.styleSheet.cssText = cssCode;
       }
    else 
       {styleElement.appendChild(document.createTextNode(cssCode));
       }
    document.getElementsByTagName("head")[0].appendChild(styleElement);
   }

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);
   }
css_insert1 =".files_box {\n  background-color: transparent;\n   color: #000000;\n  padding: 0px;\n  position: absolute;\n}\n\n";
css_insert2 =
  ".bar {\n  background-color: #70211C;\n  color: #ffffff;\n  cursor: move;\n  font-weight: bold;\n}\n\n.bar A:link {color: #FFFFFF;}";
css_insert3 =".content {\n  background-color:transparent;}\n\n";

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 (document.getElementById("boxB_" + identifier))
   {if (doc.getElementById("boxB_" + identifier).style.display == "none")
       {doc.getElementById("boxB_" + identifier).style.display = "inline-table";
       }
    else 
       {doc.getElementById("boxB_" + identifier).style.display = "none";
       }
   }
else 
   {run_script(tt + "dragbox/dragbox.js");
    addCss(css_insert1);
    addCss(css_insert2);
    addCss(css_insert3);
    set_obj_funcs();
   }
void (0);
[/spoil]


-EDIT-
Fixed dragging but, that occurred with multiple menu's
Added script with image to hide menu rather than text.
 
Last edited:

DeletedUser

Guest
Awesome! Love the second one.

Is it possible to have preset positions like mid screen left/right or lower left/right corner?
I know I can edit left:400px;top:150px but that is dependent to the screen resolution.
 

DeletedUser

Guest
So, im just a noob who can make small changes in scripts and what not.. so please explain this a little... :p

I understand that this makes a small drop down menu, but is there a way to not make the script bar increase the size when the script is pressed? Im not sure but i think this is what sineus meant but i have not seen the taktimer menus :S

And is there a way to change the scripts that are on the script? Like, having all recruit scripts on one list, all defending scripts in the other.. a way to group certain scripts?

Tnx :) btw i really like the skype smiley button.. i was playing around with it and its really fun :D:D:D
 

DeletedUser

Guest
EDIT:

I saw the 2 updates :p meh bad :p

both have the same problem... There is no background so it is quite hard to see the different between the text and the text/images behind the text so it is a little annoying :( It also does not drag. The 4 arrow mouse pointer changes as if it should, but it just isnt for me. It is maybe a browser issue, I use Opera. Ill try firefox and chrome in a minute.

Other than that I love the script :p

Edit:

The draggy thingy works in chrome but all the other issues are there still. Except instead of a list, it is all stretched out.

Back in opera, it just does not close the little bar.. Im not sure if this is meant to be, or not to be, but the title bar only shows. You can hide the rest of the list, and show the rest of the list.. But the little title bar saying leadership scripts or somethign similar still shows up whatever you press.

I found on chrome after a few minutes it automatically closed.
 
Last edited by a moderator:

File Not Found

Guest
Awesome! Love the second one.

Is it possible to have preset positions like mid screen left/right or lower left/right corner?
I know I can edit left:400px;top:150px but that is dependent to the screen resolution.


I'll work on adding some preset positions for the user to select.



So, im just a noob who can make small changes in scripts and what not.. so please explain this a little... :p

I understand that this makes a small drop down menu, but is there a way to not make the script bar increase the size when the script is pressed? Im not sure but i think this is what sineus meant but i have not seen the taktimer menus :S

And is there a way to change the scripts that are on the script? Like, having all recruit scripts on one list, all defending scripts in the other.. a way to group certain scripts?

Tnx :) btw i really like the skype smiley button.. i was playing around with it and its really fun :D:D:D


Taktimer doesn't actually have a menu, just several server generated alert boxes.

As for changing the scripts, yes, it can be done, all is explained in the first post.

The skype smiley script was mostly someone else code, modified to suit the requested task. But I appreciate your appreciation of it.





Note:
In initial testing, the versions posted in my last post, were floating, and dragable. This no longer seems to be the case. Atleast in Opera.
 

File Not Found

Guest
Right...

The dragable (and thus most functional) version of the script is presently incompatible with opera.

I will work on this today.
 

DeletedUser

Guest
As a being of lesser than average intelligence, I did not understand the first post :D Can you please dumb it down like 5x? :D
 

File Not Found

Guest
right, the below will work in opera also.

It's not as fancy as the previous ones, but has a higher compatibility.

[spoil]
Code:
javascript: ALT_TEXT = "(Alt Text) Leader Package (Floating - 2) (End Alt Text)";
identifier = "Leader Package - Floating(2)";
default_x = '100';
default_y = '150';
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;
   }
else 
   {doc = document;
   }

function set_obj_funcs()
   {insert_this = "<div z-index='1000' style='float:left; position: absolute;left:" + default_x + "px; top:" + default_y + "px;' class='dragableElement main'><table id='float_menu_" + identifier + "' z-index='999' class='main' style=\"border:1px;\"><tr><th style=\"width:100%; cursor: move;\">"+identifier+"</th></tr>";

    for (i = 0;i < abilities.length;i++)
       {insert_this += "<tr><td><a href=\"" + abilities[i] + "\">" + titles[i] + "</a></td></tr>";
       }
     insert_this += "</table></div>";

    doc.body.innerHTML += insert_this;
   }

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 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();
   }
void (0);
[/spoil]
 

File Not Found

Guest
As a being of lesser than average intelligence, I did not understand the first post :D Can you please dumb it down like 5x? :D


identifier = "Leader Package"; <--- This will need to be identifier = "some unique text string"; (You make this some unique string, in order to allow yourself multiple menus, without them interfering. It also doubles as the header for the menu.)

tt = ""; this is entirely unnecessary, but you will need it to use the current script, as all scripts are being hosted on TakTimer.net <----- (Just a link to the scripts folder on taktimer.net)


abilities = []; You will need to configure this array, with the actions you want your menu to perform. eg "javascript: alert('working');" <----- (You insert your scripts, and or links in this array, seperated by a comma (,)) (It's best to only use hosted scripts from the menu if possible.


title = [] ; This needs to be the names for the abilities, in the same order. (This is the name of the script that appears in the menu. It has to be in the same order, as the scripts / links in the abilities array)


The script I have provided is just a demonstration of what the script does. erase everything inside the two arrays (abilities, and titles), between the [ ]'s, in order to start your own.


For hosted scripts, your ability array, should have (in position X) "javascript: run_script('script address'); void(0);"

and for links, it would be either "javascript: w_o('web address'); void(0);"

or, just the link itself surrounded by "'s.

using w_o(bla bla) will open in a new window, whereas using it without w_o will open in the present.
 

DeletedUser

Guest
That helps a lot :p Thanks :)

The last spoiler tag with the script works a lot better than the other ones, but it still doesnt drag :(
 

File Not Found

Guest
You definately have to wait for it to load the external file, and, I found, sometimes you have to spam it with the mouse.
 

DeletedUser

Guest
I have an idea - swap
login_close.png
with arr_up and arr_down from
header.png


I hope it's not too hard to implement and the additional CSS code won't bloat up the script too much.
 

File Not Found

Guest
[spoil]
Code:
javascript: ALT_TEXT = "(Alt Text) Leader Package (Floating - 2) (End Alt Text)";
identifier = "Leader Package - Floating(2)";
default_x = '100';
default_y = '150';
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;
   }
else 
   {doc = document;
   }

function set_obj_funcs()
   {insert_this = "<div z-index='1000' style='float:left; position: absolute;left:" + default_x + "px; top:" + default_y + "px;' class='dragableElement main'><table id='float_menu_" + identifier + "' z-index='999' class='main' style=\"border:1px;\"><tr><th style=\"width:100%; cursor: move;\">"+identifier+" <span class=\"icon header arr_up\"></span></th></tr>";

    for (i = 0;i < abilities.length;i++)
       {insert_this += "<tr><td><a href=\"" + abilities[i] + "\">" + titles[i] + "</a></td></tr>";
       }
     insert_this += "</table></div>";

    doc.body.innerHTML += insert_this;
   }

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 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();
   }
void (0);
[/spoil]

I'll obviously still need to code it to actually minimize the box, but, is this what your after.
 

pillburydough

Guest
can you post some screen shots to show me how it works...?
 
Top