Need help for a short script for iload.to

in Ideas and script requests
Subscribe to Need help for a short script for iload.to 4 posts, 2 voices



master256 User
Firefox

Hello,

as on my other post here http://userscripts.org/topics/85879
i have a similar Problem on another site.
On each download you open on iload.to the links
to the mirrors are by default hidden and only shown by klicking on
" >> Alle Mirrors anzeigen " Button

(see yourself Here)

the code on this button is:

div class="show-me-all-links" style="">
a onclick="$('.ddl-mirror-table').show();$('.show-me-all-links').hide();" class="ddl-mirror-box button">
h4>>> Alle Mirrors anzeigen/h4>
/a>
/div>

Can someone just shortly tell me what i have to put in my new userscript
to do the "button-click" on every page load from iload.to?

Thank you

 
master256 User
Firefox

Hello,
i've tried a workaround but i won't work,
i've tried this:

for (i=0;i < document.getElementsByClassName('show-me-all-links').length;i++)
{
     document.getElementsByClassName('show-me-all-links')[i].style.display='none';
};

for (i=0;i < document.getElementsByClassName('ddl-mirror-table').length;i++)
{
     document.getElementsByClassName('ddl-mirror-table')[i].style.display='table';
};

The general Code of the for-Block is working,
when i test it with class "ddl-mirror-box button", it's working fine and removes all the little green buttons, one after another...

for (i=0;i < document.getElementsByClassName('ddl-mirror-box button').length;i++)
{
     document.getElementsByClassName('ddl-mirror-box button')[i].style.display='none';
};

But for the classes to hide the div with the "Alle Mirrors anzeigen" Button (class show-me-all-links)
and show the "ddl-mirror-table", it is not working,
maybe someone can have a short look at that?!

___________________________
Update:
again tested all i found in net, nothing working:

// ==UserScript==
// @name           iload.to "Alle Mirrors anzeigen"
// @namespace      iload.to
// @description    iload.to "Alle Mirrors anzeigen"
// @include        http://*iload.to*
// @require        http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js
// ==/UserScript==


for (i=0;i < document.getElementsByClassName('ddl-mirror-table').length;i++)
{
document.getElementsByClassName('ddl-mirror-table')[i].style.display='table';
document.getElementsByClassName('ddl-mirror-table')[i].show();
};
ddl-mirror-table.show();
$('.ddl-mirror-table').show();



for (i=0;i < document.getElementsByClassName('show-me-all-links').length;i++)
{
document.getElementsByClassName('show-me-all-links')[i].style.display='none';
document.getElementsByClassName('show-me-all-links')[i].hide();
};
show-me-all-links.hide();
$('.show-me-all-links').hide();


// Alle Uploads auf einmal anzeigen
//for (i=0;i < document.getElementsByClassName('ddl-reupload-box').length;i++)
//{
//document.getElementsByClassName('ddl-reupload-box')[i].style.display='block';
//};





//Test
//document.getElementById('ttContent').style.display = 'none'; 

 
TeamViPeRs Scriptwright
Firefox

You can do this only with some lines of pure jQuery :D

Code wrote only for you by 'TeamVipers'.


$(document).ready(function(){

	$('.ddl-mirror-table').show();
	$('.show-me-all-links').hide();

});

 
master256 User
Firefox

Working perfect, thanks a lot...

I knew from start my main problem is my "language problems"
Good that guys are here that speak "java" ;-))

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel