Wanikani: Dashboard Level

Adds level back to the dashboard header

Από την 25/05/2019. Δείτε την τελευταία έκδοση.

// ==UserScript==
// @name         Wanikani: Dashboard Level
// @namespace    http://tampermonkey.net/
// @version      0.2.1
// @description  Adds level back to the dashboard header
// @author       Kumirei
// @include      https://www.wanikani.com*
// @grant        none
// ==/UserScript==

(function() {
		var level = $('li.user-summary__attribute a')[0].href.split('/level/')[1];
		$('.sitemap .sitemap__section:first-child h2').before('<span class="dashboard-level">'+level+'</span>');
		$('head').append('<style id="DashboardLevelCSS">'+
						 '.dashboard-level {'+
						 '    background: #a0f;'+
						 '    min-width: 16px;'+
						 '    padding: 0 8px;'+
						 '    font-size: 0.75rem;'+
						 '    display: inline-block;'+
						 '    vertical-align: top;'+
						 '    border-radius: 4px 0 0 4px;'+
						 '    line-height: 32px;'+
						 '    color: #fff;'+
						 '    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);'+
						 '    font-weight: bold;'+
						 '    text-align: center;'+
						 '}'+
						 '.sitemap .sitemap__section:first-child h2 {'+
						 '    display: inline-block;'+
						 '    border: 2px solid rgba(0, 0, 0, 0.1);'+
						 '    border-left: 0;'+
						 '    padding-left: 11px;'+
						 '}'+
						 '</style>');
})();