Skip to content

Instantly share code, notes, and snippets.

@t9md t9md/README.md
Last active May 14, 2020

Embed
What would you like to do?
Bookmarklet to copy subtitles when you are using LLN(for Netflix)+LLY(for Youtube)

bookmarklet-setup

This bookmarklet works for both LLN and LLY.

  1. Create bookmark on bookmarkbar with the name copy-subtitle.
  2. Edit bookmark you've just created and replace URL with content of clip-subtitle.js.
  3. On Yourtube with LLY enabled, click bookmarklet. Done.
  4. Now, you have subtitles in your clipboard. So you can paste it to DeepL

If you want to modify bookmarklet.

  1. Use original.js as template and modify as you like.
  2. Compile it on Closure Compiler. See more detailed instruction at here(Japanese Site).
javascript:'use strict';(async function(){var a=Array.from(document.getElementById("lln-vertical-view-subs").children).map(a=>a.innerText.trim()).join("\n");await navigator.clipboard.writeText(a);console.log("subtitle copied!!")})();
// ==ClosureCompiler==
// @output_file_name default.js
// @compilation_level SIMPLE_OPTIMIZATIONS
// @language_out ECMASCRIPT_2017
// ==/ClosureCompiler==
javascript:(async function() {
var t = Array.from(document.getElementById("lln-vertical-view-subs").children).map((e) => e.innerText.trim()).join("\n")
await navigator.clipboard.writeText(t)
console.log("subtitle copied!!");
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.