User:Chlod/Scripts/FoldArchives: Difference between revisions

Content deleted Content added
New script
 
Configuration: wrong element
Line 22:
== Configuration ==
You can enable a transparent-to-dark fade by inserting the following line before importing the script.
<templatestylessyntaxhighlight lang="js">
window.folda_dark = true;
</syntaxhighlight>
</templatestyles>
 
You can override the gradient entirely by inserting the following line before importing the script. Note that you need to use a working CSS background.
<templatestylessyntaxhighlight lang="js">
// Replace this with any value you want.
window.folda_gradient = "linear-gradient(to bottom, transparent 75%, pink 95%, pink)";
</syntaxhighlight>
</templatestyles>
 
You can also set the height of the folded box by inserting the following line before importing the script. Note that you need to include a CSS unit with this value, or else it won't work properly.
<templatestylessyntaxhighlight lang="js">
// Replace this with any value you want.
window.folda_maxHeight = "50vh";
</syntaxhighlight>
</templatestyles>
 
If this script causes conflicts with the classes of other scripts, you can override the class prefix by inserting the following line before importing the script. In most cases, you wouldn't need this though.
<templatestylessyntaxhighlight lang="js">
// Replace this with any value you want.
window.folda_prefix = "someRandomCssClass-";
</syntaxhighlight>
</templatestyles>
 
== Source ==