- Portals
- The Current Year
- ED in the News
- Admins
- Help ED Rebuild
- Archive
- ED Bookmarklet
- Donate Bitcoin
Contact an admin on Discord or EDF if you want an account. Also fuck bots.
User:Disassemblyline/Rainbow blinkies test: Difference between revisions
Jump to navigation
Jump to search
imported>Disassemblyline fix timing a little so it matches the original implementation better |
imported>Disassemblyline |
||
(11 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{info|this page has been kept here for reference purposes, should the admins need to recreate this bs an ''nth'' time. the blinkies work and do not require the below code. you can safely ignore this page entirely.}} | |||
[[rainbow blinkies]] have been broken for a while, but ive got a workaround. the downside is that it requires you to copy & paste a little bit of code. hopefully an admin will add one extra class to each of the rainbow blinkie templates (<code>class="blinker"</code> specifically) as a fallback, after that it ''should'' work for anyone who has the below code in their custom .js file (eg, [[Special:MyPage/monobook.js|User:YourName/monobook.js]]). | [[rainbow blinkies]] have been broken for a while, but ive got a workaround. the downside is that it requires you to copy & paste a little bit of code. hopefully an admin will add one extra class to each of the rainbow blinkie templates (<code>class="blinker"</code> specifically) as a fallback, after that it ''should'' work for anyone who has the below code in their custom .js file (eg, [[Special:MyPage/monobook.js|User:YourName/monobook.js]]). | ||
Line 7: | Line 9: | ||
==working example== | ==working example== | ||
{{info|this will not work unless the below javascript is saved into [[Special:MyPage/monobook.js|your sandbox'd monobook.js]] <--this link is most likely a [[red link]] which is the core reason why this example will not work for you.}} | {{info|again, this doesnt work at all and is archived for historical purposes <s>this will not work unless the below javascript is saved into [[Special:MyPage/monobook.js|your sandbox'd monobook.js]] <--this link is most likely a [[red link]] which is the core reason why this example will not work for you.</s>}} | ||
<div class="blinker" style="text-align: center; text-decoration: blink; font-size: 60px; line-height: 0.8em; margin: 15px;"> | <div class="blinker" style="text-align: center; text-decoration: blink; font-size: 60px; line-height: 0.8em; margin: 15px;"> | ||
<div style="color: red;">EXAMPLE</div> | <div style="color: red;">EXAMPLE</div> |
Latest revision as of 03:05, 13 January 2023
rainbow blinkies have been broken for a while, but ive got a workaround. the downside is that it requires you to copy & paste a little bit of code. hopefully an admin will add one extra class to each of the rainbow blinkie templates (class="blinker"
specifically) as a fallback, after that it should work for anyone who has the below code in their custom .js file (eg, User:YourName/monobook.js).
broken example
EXAMPLE
EXAMPLE
EXAMPLE
EXAMPLE
EXAMPLE
EXAMPLE
EXAMPLE
working example
again, this doesnt work at all and is archived for historical purposes |
EXAMPLE
EXAMPLE
EXAMPLE
EXAMPLE
EXAMPLE
EXAMPLE
EXAMPLE
fix the above example using javascript
paste the following into the above glaring red links:
var blinkers; //var used to hold all elements with the class "blinker" function start_blinking() { blinkers = document.getElementsByClassName('blinker'); //find those rainbow blinkies if (blinkers) { setInterval(function(){toggleBlinkHandler();}, 1000); //interval to run it } } function toggleBlinkHandler() { toggleBlink(); setTimeout(function(){toggleBlink();}, 650); //interval to turn it off } function toggleBlink() { for(var i = 0; i < blinkers.length; i++) { if(blinkers[i].style.visibility == 'visible') { blinkers[i].style.visibility = 'hidden'; //___ } else { blinkers[i].style.visibility = 'visible'; //LOL } } } window.addEventListener("load", start_blinking, false); //hook
you can see a live working example of rainbow blinkies here as a proof of concept without saving the above javascript (please, view the source - its the exact same code). most of the templates are mirrored.