RK_utils

My First Scirpt

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name RK_utils
// @namespace Violentmonkey Scripts
// @description My First Scirpt
// @version 1.0.0
// @match <all_urls>
// @run-at document-end
// @grant none
// @icon              https://avatars1.githubusercontent.com/u/30018079?s=460&v=4
// ==/UserScript==
if(!window.log){
  window.log = (...m) => console.log(...m)
}
if(!window.dir){
  window.dir = (...m) => console.dir(...m)
}
if(!window.$){
  window.$ = el => {
   let els = document.querySelectorAll(el)
   if(els.length === 0){
     //console.warn('没有该名字的选择器(seletor), 烦请在检查一下拼写吧')
     return
   }else if (els.length === 1){
     els = document.querySelector(el)       
   }
    return els
  }
}

log('RK utils work well, Have a Happy Day~')