Open spotify keyboard controls

control open spotify with the keyboard

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Open spotify keyboard controls
// @namespace    http://digfish.org/
// @version      0.1
// @description  control open spotify with the keyboard
// @author       digfish
// @match        *.spotify.*
// @grant        none
// @include    https://*.spotify.*/*
// @match      http://*.spotify.*/*
// @match      https:/*.spotify.*/*
// @copyright  digfish, based on  ${4:Gustavo Keener}
// @debugger
// @require   http://code.jquery.com/jquery-1.8.0.min.js
// ==/UserScript==

// Add jQuery, unless it already exists

if(typeof jQuery === 'undefined'|| !jQuery){
    (function(){
        var s=document.createElement('script');
        s.setAttribute('src','https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js');
        if(typeof jQuery=='undefined'){
            document.getElementsByTagName('head')[0].appendChild(s);
            console.log('jQuery inject userscript: LOADED jQuery via userscript');
        } else {
            console.log('jQuery inject userscript: jQuery WAS NOT LOADED via userscript');

        }
    })();
}

(function() {
    //    'use strict';

    console.log('Loading Script Open Spotify keyboard controls!');
    $('body').keyup(function(evt) {

        console.log('Pressed on key:', evt.which);
         // fast forward is not reacting... and to catch volume keys impossible, unless you use 
        // the usual Fx key functions...
        if (evt.which == 179 ) { // F7 Play-Pause
            $('button.control-button.spoticon-pause-16').click();
            $('button.control-button.spoticon-play-16').click();
        } else if (evt.which == 177) { // F6 rewind
            $('.spoticon-skip-forward-16').click();
        }
    });
    





})();