WK Smaller Lessons And Reviews Buttons

try to take over the world!

2020-05-29 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

// ==UserScript==
// @name         WK Smaller Lessons And Reviews Buttons
// @namespace    http://tampermonkey.net/
// @version      0.8
// @description  try to take over the world!
// @author       You
// @icon         https://i.pinimg.com/236x/5f/68/68/5f6868d18acbc1221de49387a3c07833--batman-poster-batman-batman.jpg
// @match        https://www.wanikani.com/
// @match        https://www.wanikani.com/dashboard
// @require      https://greasyfork.org/scripts/369353-jigen-s-other-stuff/code/Jigen's%20other%20stuff.js?version=604095
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    // Your code here...
    if($('.lessonAndReviewButtons').length == 0){
        $('.lessons-and-reviews').remove();
        $('.dashboard-progress').css('grid-row','1 / 3');
        //make lesson hover work with it
        $('.lessonAndReviewButtons .lessons').mouseover(function(){
            $('.lessonAndReviewButtons .lessons').attr('data-content',$('.navigation .navigation-shortcut--lessons a').attr('data-content')).popover({
                html: true,
                animation: false,
                placement: 'bottom',
                trigger: 'hover',
                template: '<div class="popover review-time"><div class="arrow"></div><div class="popover-inner"><div class="popover-content"><p></p></div></div></div>'
            });
        });
        $($('.sitemap__section-header')[0]).before('<button class="dashboard-level">'+$('li.user-summary__attribute a')[0].href.split('/level/')[1]+'</button>');
        jigen.addStyle(`
.navigation-shortcuts, .navigation-shortcuts.hidden{
    display: flex !important;
    visibility: visible;
}
@media (min-width: 768px){
.dashboard .progress-and-forecast .forecast {
grid-row: 1 / 3;
}
}
                         .dashboard-level {
                             min-width: 16px;
                             padding: 0 8px;
                             font-size: 0.75rem;
                             display: inline-block;
                             border-radius: 4px 0 0 4px;
                             vertical-align: top;
                             line-height: 32px;
                             color: #fff;
                             text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
                             font-weight: bold !important;
                             text-align: center;
    background: transparent;
    color: black;
    line-height: 28px;
    color: rgb(51, 51, 51);
border: 2px solid rgba(0, 0, 0, 0.1);
                         }
[aria-controls=sitemap__levels]{
                             border-radius: 0 4px 4px 0;
border: 2px solid rgba(0, 0, 0, 0.1);
border-left: 0
}
[aria-controls=sitemap__levels] {
width:auto;
display: inline;
}
`);
    }
})();