travisler said...
alucardeck said...
lsh3rd said...
I like the extension since I take occasional breaks at work to bang through a few cards. The coloring of WK is a bit too eye-catching to passers by, so I like that I can be a bit more discreet.
I found the Kanji to be quite small when this was running, so I made a small tweak to up-size only the "character":
$('#progress-bar, #question-type, #answer-form, #reviews, #additional-content ul li span').css(obj);
var obj3 = {'text-shadow':'none','background-color':bg,'background-image':'none','background-repeat':'','font-size':'3em','line-height':'1.5em','color':fontColor};
$('#character').css(obj3);
I never touched scripting before today, so perhaps there is a better or nicer way to do this. I'm more of an embedded firmware kind of guy...
It's correct!
however you can keep applying 'obj' in #character
and create a obj3 only with your specific changes:
var obj3 = {'font-size':'3em'}
$('#character').css(obj3);
Please feel free to adapt the script and colors to your workspace.
As most of my backgrounds are gray, it suits well.
You can check the colors code here:
http://html-color-codes.info/
I know this thread is old, but I think this is a super useful add-on, but am having trouble with the above additional code.
I want to to exactly that, increase the size of the Kanji being displayed, but have tried putting the code in the script in multiple locations with no luck. Can anyone help me?
Thanks in advance!
I just noticed that you posted this... I'll post the complete revised script - I think the source changed a bit from when I modified it at first, I had to play with this again to make it work. If you just add this script, you'll be good to go: (Edit: Oh, this really got mangled. If you can't read it, go to my profile to grab my e-mail address and I'll just e-mail it)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ==UserScript==
// @name WaniKani SFW
// @description WaniKani SFW by Alucardeck
// @version 0.02
// @grant none
// ==/UserScript==
console.log('SFW Initiated');
function init(){
var bg = '#EEE';
var bgcorrect = '#E0EAE0';
var bgincorrect = '#EAE0E0';
var fontColor = '#A0A0A0';
$('#stats').css({'font-size':'9px','line-height':'1em','color':fontColor,'text-shadow':'none'});
$('#loading, #loading-screen').css({'background-image':'none'});
var fullChange = {'text-shadow':'none','background-color':bg,'background-image':'none','background-repeat':'','font-size':'1em','line-height':'1.5em','color':fontColor};
var bgChange = {'background-color':bg,'background-image':'linear-gradient(to bottom, '+bg+', '+bg+')','background-repeat':''};
var fontChange = {'font-size': '1em', 'line-height': '1em'};
//review
$('#progress-bar, #question-type, #answer-form, #reviews, #additional-content ul li span').css(fullChange);
var obj3 = {'text-shadow':'none','background-color':bg,'background-image':'none','background-repeat':'','font-size':'3em','line-height':'1.5em','color':fontColor};
$('#character').css(obj3);
$('#answer-form form fieldset input[type=text], #answer-form form fieldset button, input#user-response').css(bgChange);
var style = $('<style>.correct {background-color: '+bgcorrect+'} .incorrect {background-color: '+bgincorrect+'} </style>');
$('html > head').append(style);
//lesson
$('#main-info, #meaning, #lesson #supplement-nav, #supplement-info').css(fullChange);
$('#main-info #character, #meaning, #lesson #supplement-info .col1, #lesson #supplement-info .col2').css(fontChange);
var style2 = $('<style>.kanji, .vocabulary, .radical {background-color: '+bg+'} </style>');
$('html > head').append(style2);
}
init();
console.log('SFW End');