Kasi-time

不可能を可能にする

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

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

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        Kasi-time
// @namespace   https://twitter.com/akameco
// @description 不可能を可能にする
// @include     http://www.kasi-time.com/*
// @version     1.01
// @grant       none
// ==/UserScript==

setTimeout(function() { 
  function selectText() {
    let el  = document.getElementById("lyrics");
    let rng = document.createRange();
    rng.selectNodeContents(el);
    window.getSelection().addRange(rng);
  }

  $('body').css('-moz-user-select','text');
  $('body').off('copy contextmenu selectstart');

  let button = $('<button>');
  button.text('選択').css({
    'margin': '10px 10px 0 0',
    'borderTop': '1px solid #ccc',
    'borderRight': '1px solid #999',
    'borderBottom': '1px solid #999',
    'borderLeft': '1px solid #ccc',
    'padding': '3px 12px',
    'cursor': 'pointer',
    'color': '#666'
  }).click(function () {
    selectText();
  });

  $('.lyrics_menu').append(button);
}, 10);