Content deleted Content added
New script |
→Installation: switch install method |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1:
{{Short description|
{{Infobox user script
| author = [[User:Chlod|Chlod]]
Line 8:
| browsers = [[Firefox]] (but likely works on all browsers)
}}
'''Fold Archives'''
== Installation ==
To install the script, add this to your [[Special:MyPage/common.js|common.js]] file.
<syntaxhighlight lang="js">
</syntaxhighlight>
▲ <code>mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Chlod/Scripts/FoldArchives.js&action=raw&ctype=text/javascript');</code>
== Configuration ==
You can enable a transparent-to-dark fade by inserting the following line before importing the script.
<
window.folda_dark = true;
</syntaxhighlight>
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.
<
// Replace this with any value you want.
window.folda_gradient = "linear-gradient(to bottom, transparent 75%, pink 95%, pink)";
</syntaxhighlight>
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.
<
// Replace this with any value you want.
window.folda_maxHeight = "50vh";
</syntaxhighlight>
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.
<
// Replace this with any value you want.
window.folda_prefix = "someRandomCssClass-";
</syntaxhighlight>
== Source ==
Line 48 ⟶ 44:
== Discussion ==
You may visit my [[User talk:Chlod|talk page]] if you have any concerns
|