Created
October 2, 2016 15:03
-
-
Save alesya-h/46327fc1592fab244abc42784ddbf191 to your computer and use it in GitHub Desktop.
Лайк трека в Яндекс.Музыке с клавиатуры
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Яндекс.Музыка : лайк трека с клавиатуры | |
// @description Нажатие f на клавиатуре добавляет трек в понравившиеся | |
// @namespace http://aguzik.net | |
// @include http://music.yandex.*/* | |
// @include https://music.yandex.*/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
var mousetrapUrl = "https://craig.global.ssl.fastly.net/js/mousetrap/mousetrap.min.js?bc893"; | |
var bindKeys = function(){ | |
Mousetrap.bind('f', function() { externalAPI.toggleLike() }); | |
} | |
jQuery.ajax({url: mousetrapUrl, dataType: 'script', success: bindKeys, async: true}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment