User:Invitatious/scripts/highlightsig
How to highlight your comment
Using a combination of a modified signature, simple CSS, and clever JavaScript code, it is possible to highlight your signature or comment.
Limitations of this script
These scripts can currently only highlight modified signatures, and also only the last paragraph of the comment. If you are an experienced user script coder and have created a solution to this problem, please let me know on my talk page.
Modified signature
You will need to modify any signature you want to contrast. Go to your preferences page, turn on "raw signature", and enter your signature in the nickname field. Surround it in these tags, replacing SIGNATURE-HERE with your signature:
<span class="sigInvitatious">SIGNATURE-HERE</span>
For example, my signature is <span class="sigInvitatious">[[User:Invitatious|Invitatious]] ([[User talk:Invitatious|talk]])</span> . It shows as Invitatious (talk) 17:09, 18 July 2006 (UTC) to another user, and Invitatious (talk) 17:09, 18 July 2006 (UTC) to me. If you like it, be sure to replace "Invitatious" with your username. Save the user preferences.
User CSS
Insert the following line (replacing "Invitatious" with your username) into your user CSS file (link only for monobook).
.sigInvitatious, .commentInvitatious {background-color: gold;} /* Highlight my signature */
You can change the color of the signature (specified by the word gold) at any time and it will have a retroactive effect back to the first modified signature you used. The color is a standard word defined at Web colors#X11 color names, or it can be a RGB color in either the hex format #RRGGBB or the decimal format rgb(r,g,b). After performing a hard reload (CTRL-F5), at this point, if you sign with the modified signature, the signature (but not the whole comment) should show highlighted in gold (or whatever other color you chose). Another note: this is not just limited to color, you could even make your signature blink if you wanted to!
User JS
Although the CSS has been installed, the entire comment will not be highlighted unless you also install the script. Open the user JS file (link only for monobook). Insert the text from User:Invitatious/highlightsig.js, replacing "Invitatious" with your username. Save and do another hard reload, and your entire comment should be highlighted! (Or at least the last paragraph.)
Date modification
- This is not complete. If you're an experienced coder, you are encouraged to help.
Maybe use a more complex script to change the background color of the style?
Other ideas for modification
- This is not complete. If you're an experienced coder, you are encouraged to help.
If you have any other ideas, list them here. I would appreciate your solutions to these problems.
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.