Last active
March 25, 2017 15:27
-
-
Save ygun/1b2592876c0e51a511facfde8fbc5413 to your computer and use it in GitHub Desktop.
Revisions
-
ygun revised this gist
Mar 25, 2017 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,6 +6,7 @@ // @author Yuriy Golubev // @match https://lingualeo.com/* // @grant GM_download // @downloadURL https://gist.github.com/ygun/1b2592876c0e51a511facfde8fbc5413/raw/a26311c5d20383cda45e7f2392b4a5da3945dff4/llsd.js // ==/UserScript== (function() { -
ygun created this gist
Mar 25, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ // ==UserScript== // @name LinguaLeo sound download // @namespace http://golubev.guru/ // @version 0.2 // @description auto download mp3 from lingualeo dictionary by F7 // @author Yuriy Golubev // @match https://lingualeo.com/* // @grant GM_download // ==/UserScript== (function() { 'use strict'; // Your code here... function doc_keyUp(e) { switch (e.keyCode) { case 118: var url = document.getElementsByClassName("word-sound-link")[0].getAttribute("data-voice-url"); var word = document.getElementsByClassName("word-sound-link")[0].parentElement.parentElement.getElementsByClassName("word-origin")[0].innerText; GM_download(url, word.replace(/ /g, "-") + ".mp3"); break; default: break; } } document.addEventListener('keyup', doc_keyUp, false); })();