Just a little fun thing I made today
owo whatâs this
Amazing.
Scripts that actually help me? No thanks.
This? Yes.
looks kewl
Amazing.
Suggestion: make it change âLessonsâ to âwhatâsâ and âReviewsâ to âthis?â
sips tea ⊠absolutely magnificent
Classy!
spills tea all over the place
I want to import all your wk script settings haha. You are amazing
I actually posted it all quite recently. Well, except for my edit to this script, but I can provide that now.
See this post: Wanikani screenshots đž - #2298 by Kumirei
Oh, and for the minor edit to the SRS Grid script, see this post: [UserScript] SRS Grid Details - #71 by Kumirei
My version of this script, the OwO script, looks like this:
// ==UserScript==
// @name WaniKani Zero Zero what's this
// @namespace FelixNemis.scripts
// @author FelixNemis
// @description Notices when you have 0 lessons and reviews and adds a little visual flair
// @match http://www.wanikani.com/
// @match http://www.wanikani.com/dashboard*
// @match https://www.wanikani.com/
// @match https://www.wanikani.com/dashboard*
// @version 0.1
// @grant none
// @run-at document-end
// ==/UserScript==
function main() {
if ($('.lessons span')[0].innerText === '0' && $('.reviews span')[0].innerText === '0') {
$('head').append('<style id="owostyle">' +
' .owo {' +
' position: absolute;' +
' left: 3.7em;' +
' top: 2em;' +
' font-size: 2em;' +
' font-family: Kristen ITC;' +
' color: #e161e7 !important;' +
' }' +
' .lessons {position: relative;}' +
' li.lessons a[href="/lesson"], li.reviews a[href="/review"] {color: transparent !important;}' +
' .nav li[class*="wanikani-tour"] a span:first-child {border: 2px solid purple !important; color: gold !important;}' +
'</style>');
$('.lessons').append('<span class="owo">w</span>');
}
}
window.addEventListener('load', main, false);
Thank you!
Canât guarantee that my edits look the same for you though, since I only tested them on my computer.
Perfect
Whenever you scroll down the styling of the top bar changes and the W just floats randomly on the screen.
So I edited the script to make the W invisible whenever your not at the top of the page and visible again whenever you are.
Just add the following to the end of the script:
//checks to see if visibility needs to be toggled
var toggleWVisibility = function() {
//set 'W' to invisible not at the top of the page
if($(window).scrollTop()!=0){
//console.log("Not the top of the page! Making W invisible");
$('head').append('<style id="owostyle">' +
' .owo {' +
' display:none;' +
' }' +
'</style>');
} else {//if at the top of the page set 'W' to visible
//console.log("Top of page! Making W visible");
$('head').append('<style id="owostyle">' +
' .owo {' +
' display:list-item;' +
' }' +
'</style>');
}
}
//calles on page load
window.onload = function() {
toggleWVisibility();
}
//called whenever the window has scrolled.
window.onscroll = function (e) {
toggleWVisibility();
}
Youâll also have to add the following new line to the original code:
owo.style.top = "2.8em"; //original line
owo.className = "owo";//new line
var lessons = document.getElementsByClassName('lessons')[0];//original line
You donât have to add that line if your using Kumireiâs styling though.
Iâve only used this edit in chrome so canât assure if it will work in firefox and such.
If you encounter any bugs just let me know.
Looks like this will keep adding styles to the head as you scroll. Maybe you want to use just one style and toggle a class instead?
Thanks for pointing this out, fixed
Rest in peace -_-