jorikschellekens / lyricist Goto Github PK
View Code? Open in Web Editor NEWA browser extension that adds lyrics to youtube.
A browser extension that adds lyrics to youtube.
When the promise for getting the lyrics fail for any reason no further requests can be made.
This bug also relates to the bug where the lyrics are not loaded on tab change.
There are a few linting issues in the code, which can be easily dealt with by adding eslint.
There should probably a cache for the lyrics. Possible keys for the lyrics could be the video title or the parsed video title, maybe both could be used.
There would be cases where the parsed title/parsed information can be re-used across different videos.
With the changes coming in (#1) it might be worthwhile to use the document title over parsing the video title.
The tag parser in its current state is actually broken, the format for how YouTube has the meta data for a video in the description is different; the title is broken into two fields one for artist and one for song.
A small sample script to test that works with the new layout is below. The script works once the description box is expanded.
Array.from(document.getElementById('collapsible').children)
.map(c => c.innerText)
.filter(c => c.indexOf('Artist') !== -1 || c.indexOf('Song') !== -1)
.map(c => c.split('\n'))
This issue is made to track the pull request and all the discussion regarding tests, specifically unit tests.
The current implementation of the mutation handler has two issues
mutationList
as passed to the handler are chronologically indistinguishable. Repeated evaluations of Date.now()
is technically incorrect.The current way of extracting the artist name and the song title do not account for the the fact that the song title can have dashes in it.
Example Kasabian - Re-wired, with the current approach the the metadata object looks like :-
{
artist: 'Kasabian - Re',
title: 'wired',
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.