├── .gitignore ├── docs ├── Gemfile ├── _layouts │ ├── page.html │ ├── default.html │ └── post.html ├── favicon.ico ├── img │ ├── logo.png │ ├── cotation.png │ ├── item-img1.jpg │ ├── slider-bg.png │ ├── feature-bg.jpg │ ├── wrapper-img.pdn │ ├── wrapper-img.png │ ├── portfolio │ │ ├── work1.jpg │ │ ├── work2.jpg │ │ ├── work3.jpg │ │ ├── work4.jpg │ │ ├── work5.jpg │ │ └── work6.jpg │ ├── call-to-action-bg.jpg │ └── clients │ │ ├── clients-logo1.png │ │ ├── clients-logo2.png │ │ ├── clients-logo3.png │ │ ├── clients-logo4.png │ │ ├── clients-logo5.png │ │ ├── clients-logo6.png │ │ ├── clients-logo7.png │ │ ├── clients-logo8.png │ │ ├── clients-logo-9.png │ │ └── clients-logo10.png ├── fonts │ ├── ionicons.eot │ ├── ionicons.ttf │ ├── ionicons.woff │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.ttf │ └── fontawesome-webfont.woff ├── screenshots │ ├── blog.png │ ├── home.png │ ├── homecropped.png │ └── homecroppedscaled.png ├── js │ ├── min │ │ ├── main.min.js │ │ ├── plugins.min.js │ │ └── waypoints.min.js │ ├── main.js │ ├── jquery.counterup.js │ ├── google-map-init.js │ └── vendor │ │ └── modernizr-2.6.2.min.js ├── README.md ├── _posts │ └── 2016-10-15-available-for-opera.md ├── css │ ├── style.css │ ├── owl.carousel.css │ ├── syntax.css │ └── responsive.css ├── _includes │ ├── footer.html │ ├── header.html │ └── head.html ├── airspace-jekyll.gemspec ├── contact.html ├── _config.yml ├── LICENSE.md ├── blog.html ├── privacy_policy.html ├── index.html └── work.html ├── closure-compiler.jar ├── glyrics-app ├── images │ ├── 3-dots.png │ ├── icon64.png │ ├── icon128.png │ ├── menu-16.png │ ├── text-style.png │ ├── animated-overlay.gif │ ├── ui-icons_222222_256x240.png │ ├── ui-icons_228ef1_256x240.png │ ├── ui-icons_ef8c08_256x240.png │ ├── ui-icons_ffd27a_256x240.png │ ├── ui-icons_ffffff_256x240.png │ ├── ui-bg_flat_10_000000_40x100.png │ ├── ui-bg_glass_100_f6f6f6_1x400.png │ ├── ui-bg_glass_100_fdf5ce_1x400.png │ ├── ui-bg_glass_65_ffffff_1x400.png │ ├── ui-bg_gloss-wave_35_f6a828_500x100.png │ ├── ui-bg_highlight-soft_75_ffe45c_1x100.png │ ├── ui-bg_diagonals-thick_18_b81900_40x40.png │ ├── ui-bg_diagonals-thick_20_666666_40x40.png │ └── ui-bg_highlight-soft_100_eeeeee_1x100.png ├── background.js ├── manifest.json ├── key.pem ├── window.css ├── window.html └── window.js ├── glyrics-ext ├── images │ ├── icon16.png │ ├── icon19.png │ ├── icon38.png │ ├── icon64.png │ ├── Close-16.png │ ├── icon128.png │ ├── Refresh-16.png │ ├── Settings-16.png │ ├── ui-icons_444444_256x240.png │ ├── ui-icons_555555_256x240.png │ ├── ui-icons_777620_256x240.png │ ├── ui-icons_777777_256x240.png │ ├── ui-icons_cc0000_256x240.png │ └── ui-icons_ffffff_256x240.png ├── fonts │ ├── Courgette.ttf │ ├── Slabo27px.ttf │ ├── CraftyGirls.ttf │ ├── Inconsolata.ttf │ ├── Calligraffitti.ttf │ ├── WalterTurncoat.ttf │ └── GloriaHallelujah.ttf ├── raaga │ ├── extract_track_info.js │ └── raaga.css ├── googlemusic │ ├── extract_track_info.js │ └── googlemusic.css ├── amazonmusic │ ├── extract_track_info.js │ └── amazonmusic.css ├── deezer │ ├── extract_track_info.js │ └── deezer.css ├── groove │ ├── extract_track_info.js │ └── groove.css ├── pandora │ ├── extract_track_info.js │ └── pandora.css ├── 8tracks │ ├── extract_track_info.js │ └── 8tracks.css ├── slacker │ ├── extract_track_info.js │ └── slacker.css ├── jango │ ├── extract_track_info.js │ └── jango.css ├── ytmusic │ ├── extract_track_info.js │ └── ytmusic.css ├── plex │ ├── extract_track_info.js │ └── plex.css ├── iheart │ ├── extract_track_info.js │ └── iheart.css ├── wynk │ ├── extract_track_info.js │ └── wynk.css ├── tidal │ ├── extract_track_info.js │ └── tidal.css ├── earbits │ ├── extract_track_info.js │ └── earbits.css ├── AccuRadio │ ├── extract_track_info.js │ └── AccuRadio.css ├── saavn │ ├── saavn.css │ └── extract_track_info.js ├── spotify │ ├── spotify.css │ └── extract_track_info.js ├── gaana │ ├── gaana.css │ └── extract_track_info.js ├── soundcloud │ ├── soundcloud.css │ └── extract_track_info.js ├── key.pem ├── color-scheme.js ├── css │ └── lyrics.css ├── options │ ├── options.html │ ├── options.css │ └── options.js ├── manifest.json └── background.js ├── store └── music.youtube.com_.png ├── compile.sh ├── .travis.yml ├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── compile.ps1 ├── Dockerfile ├── scripts └── create_zip_glyrics_ext.js ├── package.json ├── README.md ├── .circleci └── config.yml └── test └── glyrics-ext └── testTrackExtraction.js /.gitignore: -------------------------------------------------------------------------------- 1 | *.zip 2 | publish/* 3 | node_modules 4 | -------------------------------------------------------------------------------- /docs/Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | gemspec 3 | -------------------------------------------------------------------------------- /docs/_layouts/page.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | {{ content }} 5 | -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/favicon.ico -------------------------------------------------------------------------------- /docs/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/logo.png -------------------------------------------------------------------------------- /closure-compiler.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/closure-compiler.jar -------------------------------------------------------------------------------- /docs/img/cotation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/cotation.png -------------------------------------------------------------------------------- /docs/img/item-img1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/item-img1.jpg -------------------------------------------------------------------------------- /docs/img/slider-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/slider-bg.png -------------------------------------------------------------------------------- /docs/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/fonts/ionicons.eot -------------------------------------------------------------------------------- /docs/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/fonts/ionicons.ttf -------------------------------------------------------------------------------- /docs/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/fonts/ionicons.woff -------------------------------------------------------------------------------- /docs/img/feature-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/feature-bg.jpg -------------------------------------------------------------------------------- /docs/img/wrapper-img.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/wrapper-img.pdn -------------------------------------------------------------------------------- /docs/img/wrapper-img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/wrapper-img.png -------------------------------------------------------------------------------- /docs/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /docs/screenshots/blog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/screenshots/blog.png -------------------------------------------------------------------------------- /docs/screenshots/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/screenshots/home.png -------------------------------------------------------------------------------- /docs/img/portfolio/work1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/portfolio/work1.jpg -------------------------------------------------------------------------------- /docs/img/portfolio/work2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/portfolio/work2.jpg -------------------------------------------------------------------------------- /docs/img/portfolio/work3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/portfolio/work3.jpg -------------------------------------------------------------------------------- /docs/img/portfolio/work4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/portfolio/work4.jpg -------------------------------------------------------------------------------- /docs/img/portfolio/work5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/portfolio/work5.jpg -------------------------------------------------------------------------------- /docs/img/portfolio/work6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/portfolio/work6.jpg -------------------------------------------------------------------------------- /glyrics-app/images/3-dots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-app/images/3-dots.png -------------------------------------------------------------------------------- /glyrics-app/images/icon64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-app/images/icon64.png -------------------------------------------------------------------------------- /glyrics-ext/images/icon16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-ext/images/icon16.png -------------------------------------------------------------------------------- /glyrics-ext/images/icon19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-ext/images/icon19.png -------------------------------------------------------------------------------- /glyrics-ext/images/icon38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-ext/images/icon38.png -------------------------------------------------------------------------------- /glyrics-ext/images/icon64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-ext/images/icon64.png -------------------------------------------------------------------------------- /store/music.youtube.com_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/store/music.youtube.com_.png -------------------------------------------------------------------------------- /docs/img/call-to-action-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/call-to-action-bg.jpg -------------------------------------------------------------------------------- /docs/screenshots/homecropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/screenshots/homecropped.png -------------------------------------------------------------------------------- /glyrics-app/images/icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-app/images/icon128.png -------------------------------------------------------------------------------- /glyrics-app/images/menu-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-app/images/menu-16.png -------------------------------------------------------------------------------- /glyrics-ext/fonts/Courgette.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-ext/fonts/Courgette.ttf -------------------------------------------------------------------------------- /glyrics-ext/fonts/Slabo27px.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-ext/fonts/Slabo27px.ttf -------------------------------------------------------------------------------- /glyrics-ext/images/Close-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-ext/images/Close-16.png -------------------------------------------------------------------------------- /glyrics-ext/images/icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-ext/images/icon128.png -------------------------------------------------------------------------------- /docs/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/img/clients/clients-logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/clients/clients-logo1.png -------------------------------------------------------------------------------- /docs/img/clients/clients-logo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/clients/clients-logo2.png -------------------------------------------------------------------------------- /docs/img/clients/clients-logo3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/clients/clients-logo3.png -------------------------------------------------------------------------------- /docs/img/clients/clients-logo4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/clients/clients-logo4.png -------------------------------------------------------------------------------- /docs/img/clients/clients-logo5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/clients/clients-logo5.png -------------------------------------------------------------------------------- /docs/img/clients/clients-logo6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/clients/clients-logo6.png -------------------------------------------------------------------------------- /docs/img/clients/clients-logo7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/clients/clients-logo7.png -------------------------------------------------------------------------------- /docs/img/clients/clients-logo8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/clients/clients-logo8.png -------------------------------------------------------------------------------- /glyrics-app/images/text-style.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-app/images/text-style.png -------------------------------------------------------------------------------- /glyrics-ext/fonts/CraftyGirls.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-ext/fonts/CraftyGirls.ttf -------------------------------------------------------------------------------- /glyrics-ext/fonts/Inconsolata.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-ext/fonts/Inconsolata.ttf -------------------------------------------------------------------------------- /glyrics-ext/images/Refresh-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-ext/images/Refresh-16.png -------------------------------------------------------------------------------- /glyrics-ext/images/Settings-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-ext/images/Settings-16.png -------------------------------------------------------------------------------- /docs/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/img/clients/clients-logo-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/clients/clients-logo-9.png -------------------------------------------------------------------------------- /docs/img/clients/clients-logo10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/img/clients/clients-logo10.png -------------------------------------------------------------------------------- /glyrics-ext/fonts/Calligraffitti.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-ext/fonts/Calligraffitti.ttf -------------------------------------------------------------------------------- /glyrics-ext/fonts/WalterTurncoat.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-ext/fonts/WalterTurncoat.ttf -------------------------------------------------------------------------------- /docs/screenshots/homecroppedscaled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/docs/screenshots/homecroppedscaled.png -------------------------------------------------------------------------------- /glyrics-app/images/animated-overlay.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-app/images/animated-overlay.gif -------------------------------------------------------------------------------- /glyrics-ext/fonts/GloriaHallelujah.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-ext/fonts/GloriaHallelujah.ttf -------------------------------------------------------------------------------- /glyrics-app/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-app/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /glyrics-app/images/ui-icons_228ef1_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-app/images/ui-icons_228ef1_256x240.png -------------------------------------------------------------------------------- /glyrics-app/images/ui-icons_ef8c08_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-app/images/ui-icons_ef8c08_256x240.png -------------------------------------------------------------------------------- /glyrics-app/images/ui-icons_ffd27a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-app/images/ui-icons_ffd27a_256x240.png -------------------------------------------------------------------------------- /glyrics-app/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-app/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /glyrics-ext/images/ui-icons_444444_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-ext/images/ui-icons_444444_256x240.png -------------------------------------------------------------------------------- /glyrics-ext/images/ui-icons_555555_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-ext/images/ui-icons_555555_256x240.png -------------------------------------------------------------------------------- /glyrics-ext/images/ui-icons_777620_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-ext/images/ui-icons_777620_256x240.png -------------------------------------------------------------------------------- /glyrics-ext/images/ui-icons_777777_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-ext/images/ui-icons_777777_256x240.png -------------------------------------------------------------------------------- /glyrics-ext/images/ui-icons_cc0000_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-ext/images/ui-icons_cc0000_256x240.png -------------------------------------------------------------------------------- /glyrics-ext/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-ext/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /glyrics-app/images/ui-bg_flat_10_000000_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-app/images/ui-bg_flat_10_000000_40x100.png -------------------------------------------------------------------------------- /glyrics-app/images/ui-bg_glass_100_f6f6f6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-app/images/ui-bg_glass_100_f6f6f6_1x400.png -------------------------------------------------------------------------------- /glyrics-app/images/ui-bg_glass_100_fdf5ce_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-app/images/ui-bg_glass_100_fdf5ce_1x400.png -------------------------------------------------------------------------------- /glyrics-app/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-app/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /glyrics-app/images/ui-bg_gloss-wave_35_f6a828_500x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-app/images/ui-bg_gloss-wave_35_f6a828_500x100.png -------------------------------------------------------------------------------- /glyrics-app/images/ui-bg_highlight-soft_75_ffe45c_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-app/images/ui-bg_highlight-soft_75_ffe45c_1x100.png -------------------------------------------------------------------------------- /glyrics-app/images/ui-bg_diagonals-thick_18_b81900_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-app/images/ui-bg_diagonals-thick_18_b81900_40x40.png -------------------------------------------------------------------------------- /glyrics-app/images/ui-bg_diagonals-thick_20_666666_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-app/images/ui-bg_diagonals-thick_20_666666_40x40.png -------------------------------------------------------------------------------- /glyrics-app/images/ui-bg_highlight-soft_100_eeeeee_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samik-saha/glyrics/HEAD/glyrics-app/images/ui-bg_highlight-soft_100_eeeeee_1x100.png -------------------------------------------------------------------------------- /docs/js/min/main.min.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){$("#portfolio-contant-active").mixItUp(),$("#owl-example").owlCarousel({paginationSpeed:500,singleItem:!0}),$("#features-section").owlCarousel({autoPlay:3e3,items:5,itemsDesktop:[1199,5],itemsDesktopSmall:[979,5]})}); -------------------------------------------------------------------------------- /docs/js/min/plugins.min.js: -------------------------------------------------------------------------------- 1 | !function(){for(var o,e=function(){},n=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","log","markTimeline","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"],r=n.length,i=window.console=window.console||{};r--;)o=n[r],i[o]||(i[o]=e)}(); -------------------------------------------------------------------------------- /glyrics-ext/raaga/extract_track_info.js: -------------------------------------------------------------------------------- 1 | //Get song information from www.raaga.com page 2 | function fetchTrackInfo(){ 3 | songName = ''; 4 | album = ''; 5 | firstArtist = ''; 6 | artists = ''; 7 | 8 | songName = $(".player_track_title").text(); 9 | firstArtist = $(".album_title:first").children(":last").text(); 10 | 11 | } -------------------------------------------------------------------------------- /glyrics-ext/googlemusic/extract_track_info.js: -------------------------------------------------------------------------------- 1 | //Get song information from grooveshark.com page 2 | function fetchTrackInfo(){ 3 | songName = ''; 4 | album = ''; 5 | firstArtist = ''; 6 | artists = ''; 7 | 8 | songName = $('#currently-playing-title').text().trim(); 9 | firstArtist = $('#player-artist').text().trim(); 10 | 11 | } -------------------------------------------------------------------------------- /glyrics-ext/amazonmusic/extract_track_info.js: -------------------------------------------------------------------------------- 1 | function fetchTrackInfo() { 2 | window.songName = ''; 3 | window.album = ''; 4 | window.firstArtist = ''; 5 | window.artists = ''; 6 | 7 | songName = $('.playbackControlsView .trackTitle').text().trim(); 8 | firstArtist = $('.playbackControlsView .trackArtist').text().trim(); 9 | 10 | } -------------------------------------------------------------------------------- /docs/_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {% include head.html %} 6 | 7 | 8 | 9 | 10 | 11 | {% include header.html %} 12 | 13 | 14 | {{ content }} 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | {% include footer.html %} 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /glyrics-ext/deezer/extract_track_info.js: -------------------------------------------------------------------------------- 1 | //Get song information from AccuRadio.com page 2 | function fetchTrackInfo() { 3 | songName = ''; 4 | album = ''; 5 | firstArtist = ''; 6 | artists = ''; 7 | 8 | songName = $(".track-title").text().split(" · ")[0].trim(); 9 | firstArtist = $(".track-title").text().split(" · ")[1].trim(); 10 | 11 | } -------------------------------------------------------------------------------- /glyrics-ext/groove/extract_track_info.js: -------------------------------------------------------------------------------- 1 | //Get song information from grooveshark.com page 2 | function fetchTrackInfo(){ 3 | songName = ''; 4 | album = ''; 5 | firstArtist = ''; 6 | artists = ''; 7 | 8 | songName = $('#player div.primaryMetadata a').text().trim(); 9 | firstArtist = $('#player div.secondaryMetadata a:first').text().trim(); 10 | 11 | } -------------------------------------------------------------------------------- /glyrics-ext/pandora/extract_track_info.js: -------------------------------------------------------------------------------- 1 | //Get song information from grooveshark.com page 2 | function fetchTrackInfo(){ 3 | songName = ''; 4 | album = ''; 5 | firstArtist = ''; 6 | artists = ''; 7 | 8 | songName = $(".Tuner__Audio__TrackDetail__title").text().trim(); 9 | firstArtist = $(".Tuner__Audio__TrackDetail__artist").text().trim(); 10 | 11 | } -------------------------------------------------------------------------------- /glyrics-ext/8tracks/extract_track_info.js: -------------------------------------------------------------------------------- 1 | //Get song information from AccuRadio.com page 2 | function fetchTrackInfo() { 3 | songName = ''; 4 | album = ''; 5 | firstArtist = ''; 6 | artists = ''; 7 | 8 | songName = $("#now_playing div.title_artist span.t").text().trim(); 9 | firstArtist = $("#now_playing div.title_artist span.a").text().trim(); 10 | 11 | } -------------------------------------------------------------------------------- /glyrics-ext/slacker/extract_track_info.js: -------------------------------------------------------------------------------- 1 | //Get song information from AccuRadio.com page 2 | function fetchTrackInfo() { 3 | window.songName = ''; 4 | window.album = ''; 5 | window.firstArtist = ''; 6 | window.artists = ''; 7 | 8 | songName = $("div.metadata span:last").text().trim(); 9 | firstArtist = $("div.metadata span:first").text().trim(); 10 | 11 | } -------------------------------------------------------------------------------- /glyrics-ext/jango/extract_track_info.js: -------------------------------------------------------------------------------- 1 | //Get song information from jango.com page 2 | function fetchTrackInfo() { 3 | window.songName = ''; 4 | window.album = ''; 5 | window.firstArtist = ''; 6 | window.artists = ''; 7 | 8 | window.songName = $("#current-song").text().trim(); 9 | window.firstArtist = $("#player_current_artist").find("a").text().trim(); 10 | } -------------------------------------------------------------------------------- /glyrics-ext/ytmusic/extract_track_info.js: -------------------------------------------------------------------------------- 1 | /* Extract track info from Wynk */ 2 | /* global $ */ 3 | function fetchTrackInfo() { 4 | window.songName = ""; 5 | window.album = ""; 6 | window.firstArtist = $(".subtitle.ytmusic-player-bar .byline a:first").text(); 7 | window.artists = ""; 8 | window.songName = $(".title.ytmusic-player-bar:first").text().trim(); 9 | window.album = ""; 10 | } 11 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # _Airspace_ for Jekyll 2 | ![screenshot](screenshots/home.png "Description goes here") 3 | 4 | This Jekyll theme is a port of ThemeFisher's Airspace template. It is released under ThemeFisher's free license, which requires attribution. 5 | 6 | ## Usage 7 | To start your project, [fork this respository](https://github.com/luminousrubyist/airspace-jekyll/fork), put in your content, and go! 8 | -------------------------------------------------------------------------------- /glyrics-ext/plex/extract_track_info.js: -------------------------------------------------------------------------------- 1 | //Get song information from grooveshark.com page 2 | function fetchTrackInfo(){ 3 | songName = ''; 4 | album = ''; 5 | firstArtist = ''; 6 | artists = $('[class^=PlayerControlsMetadata-container]:first span a:first').text(); 7 | songName = $('[class^=PlayerControlsMetadata-container]:first a:first').text().trim(); 8 | firstArtist = artists.split(",")[0]; 9 | } -------------------------------------------------------------------------------- /glyrics-ext/iheart/extract_track_info.js: -------------------------------------------------------------------------------- 1 | /* Extract track info from Wynk */ 2 | /* global $ */ 3 | function fetchTrackInfo() { 4 | window.songName = ""; 5 | window.album = ""; 6 | window.firstArtist = $("div[data-test='mini-player-description-text']").text().trim(); 7 | window.artists = ""; 8 | window.songName = $("div[data-test='mini-player-track-text']").text().trim(); 9 | window.album = ""; 10 | } 11 | -------------------------------------------------------------------------------- /compile.sh: -------------------------------------------------------------------------------- 1 | for file in $(find glyrics-ext -type "f" ); do 2 | 3 | outfile="publish/$file" 4 | 5 | if [[ $file == *.js ]] && [[ $file != *.min.js ]]; then 6 | echo Compiling $file to $outfile 7 | java -jar closure-compiler.jar --compilation_level SIMPLE --js $file --js_output_file $outfile 8 | else 9 | echo Copying $file to $outfile 10 | cp --parents $file publish 11 | fi 12 | done -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "node" 4 | dist: trusty 5 | addons: 6 | apt: 7 | packages: 8 | # This is required to run new chrome on old trusty 9 | - libnss3 10 | notifications: 11 | email: false 12 | cache: 13 | directories: 14 | - node_modules 15 | # allow headful tests 16 | before_install: 17 | # Enable user namespace cloning 18 | - "sysctl kernel.unprivileged_userns_clone=1" 19 | # Launch XVFB 20 | - "export DISPLAY=:99.0" 21 | - "sh -e /etc/init.d/xvfb start" -------------------------------------------------------------------------------- /docs/_posts/2016-10-15-available-for-opera.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: Gaana Lyrics extension is now available for Opera 4 | date: 2016-10-15 21:11:27 5 | author: Samik 6 | --- 7 | 8 | The extension went live at the Opera add-ons store after a extensive review process by Opera team. Please checkout the new extension at [https://addons.opera.com/en/extensions/details/gaana-lyrics-extension][opera-addon-link]. 9 | 10 | [opera-addon-link]: https://addons.opera.com/en/extensions/details/gaana-lyrics-extension 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | **Describe the bug** 8 | A clear and concise description of what the bug is. 9 | 10 | **To Reproduce** 11 | If appliable, steps to reproduce the problem 12 | 13 | **Screenshots** 14 | If applicable, add screenshots to help explain your problem. 15 | 16 | **Desktop (please complete the following information):** 17 | - OS: [e.g. iOS] 18 | - Browser [e.g. chrome, safari] 19 | - Version [e.g. 22] 20 | -------------------------------------------------------------------------------- /glyrics-ext/wynk/extract_track_info.js: -------------------------------------------------------------------------------- 1 | /* Extract track info from Wynk */ 2 | /* global $ */ 3 | function fetchTrackInfo() { 4 | window.songName = ""; 5 | window.album = ""; 6 | window.firstArtist = $('div.songlist-lhs:has(div.song-current) .songlist-info span').text().split("-")[0].trim(); 7 | window.artists = ""; 8 | window.songName = $('div.songlist-lhs:has(div.song-current) .songlist-info p a').text().trim(); 9 | window.album = $(".wynk-nplayer-wrap.mob-player-bottom div.nplayerinfo-lhs p span").text().trim(); 10 | } 11 | -------------------------------------------------------------------------------- /glyrics-ext/tidal/extract_track_info.js: -------------------------------------------------------------------------------- 1 | //Get song information from Tidal 2 | function fetchTrackInfo() { 3 | window.songName = ''; 4 | window.album = ''; 5 | window.firstArtist = ''; 6 | window.artists = ''; 7 | 8 | var trackName, trackArtist; 9 | trackName = $('[class^=mediaInformation]:first').children().first().text().trim() 10 | trackArtist = $('[class^=mediaInformation]:first').children().last().text().trim();; 11 | 12 | window.songName = trackName; 13 | window.firstArtist = trackArtist; 14 | } 15 | -------------------------------------------------------------------------------- /glyrics-app/background.js: -------------------------------------------------------------------------------- 1 | chrome.app.runtime.onLaunched.addListener(launchApp); 2 | 3 | chrome.runtime.onMessageExternal.addListener(function(request, sender, 4 | sendResponse) { 5 | if (request.msgType === "LaunchApp") { 6 | console.log("Request received to launch app from extension"); 7 | launchApp(); 8 | } 9 | if (request.msgType === "Version") { 10 | sendResponse({version: 1.2}); 11 | } 12 | }); 13 | 14 | function launchApp() { 15 | chrome.app.window.create('window.html', { 16 | 'bounds' : { 17 | width: 360, 18 | height: 540 19 | }, 20 | 'id':'glyrics-app' 21 | }); 22 | } -------------------------------------------------------------------------------- /glyrics-ext/earbits/extract_track_info.js: -------------------------------------------------------------------------------- 1 | //Get song information from grooveshark.com page 2 | function fetchTrackInfo(){ 3 | songName = ''; 4 | album = ''; 5 | firstArtist = ''; 6 | artists = ''; 7 | 8 | _track = $("#track_info .track_name").text(); 9 | _album = $("#track_info .album_name").text(); 10 | _artist = $("#artist_name").text(); 11 | 12 | if (_track != undefined){ 13 | songName = _track.trim(); 14 | } 15 | 16 | if(_album != undefined){ 17 | album = _album.trim(); 18 | } 19 | 20 | if(_artist != undefined){ 21 | firstArtist = _artist.trim(); 22 | } 23 | } -------------------------------------------------------------------------------- /glyrics-ext/AccuRadio/extract_track_info.js: -------------------------------------------------------------------------------- 1 | //Get song information from AccuRadio.com page 2 | function fetchTrackInfo() { 3 | songName = ''; 4 | album = ''; 5 | firstArtist = ''; 6 | artists = ''; 7 | 8 | //For longer names there are multiple divs inside 9 | //for animation. Just take one of them 10 | if ( $('#songtitle').children().length == 0){ 11 | songName = $('#songtitle').text().trim(); 12 | } 13 | else{ 14 | songName = $('#songtitle div:first').text().trim(); 15 | } 16 | 17 | firstArtist = $('#songartist').text().trim(); 18 | album = $('#songalbum').text().trim(); 19 | } -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | **Is your feature request related to a problem? Please describe.** 8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 9 | 10 | **Describe the solution you'd like** 11 | A clear and concise description of what you want to happen. 12 | 13 | **Describe alternatives you've considered** 14 | A clear and concise description of any alternative solutions or features you've considered. 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the feature request here. 18 | -------------------------------------------------------------------------------- /compile.ps1: -------------------------------------------------------------------------------- 1 | $files = Get-ChildItem -Path "glyrics-ext" -Recurse|Where-Object{!($_.PSIsContainer)} 2 | for ($i=0; $i -lt $files.Count; $i++) { 3 | $infile = Resolve-Path -Path $files[$i].FullName -Relative 4 | 5 | $outfile = "publish\" + $infile 6 | if( $infile -match "\.js$" -and $infile -notmatch "\.min.js$"){ 7 | echo "Compiling $infile to $outfile" 8 | java -jar closure-compiler.jar --compilation_level SIMPLE --js $infile --js_output_file $outfile 9 | } 10 | else{ 11 | echo "Copying $infile to $outfile" 12 | New-Item -ItemType File -Path $outfile -Force 13 | Copy-Item $infile $outfile -Force 14 | } 15 | } 16 | echo "Done!" -------------------------------------------------------------------------------- /docs/css/style.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This css file includes styles added in the jekyll port of this theme. 3 | * To find the original style.css that ships with Airspace, read airspace.css 4 | * 5 | */ 6 | 7 | .italic { 8 | font-style: italic; 9 | } 10 | 11 | .bold { 12 | font-weight: bold; 13 | } 14 | 15 | .center-text { 16 | text-align: center; 17 | } 18 | 19 | .post-area { 20 | padding: 40px; 21 | width: 100%; 22 | min-height: 150px; 23 | background-color: white; 24 | border-bottom: 1px dotted #ddd; 25 | } 26 | 27 | .post-area a:link, .post-area a:visited { 28 | font-size: 30px; 29 | color: #333; 30 | } 31 | 32 | .post-area a:hover { 33 | color: #0D0017; 34 | } 35 | -------------------------------------------------------------------------------- /glyrics-ext/tidal/tidal.css: -------------------------------------------------------------------------------- 1 | #lyrics-container { 2 | color: black; 3 | background-color: white; 4 | border-color: #0477a7; 5 | } 6 | 7 | #lyrics-topbar { 8 | color: white; 9 | background-color: #0477a7; 10 | } 11 | 12 | #glyrics-content,#glyrics-content * { 13 | color: black; 14 | } 15 | 16 | #glyrics-content a:LINK { 17 | color: #018cbc; 18 | } 19 | 20 | #glyrics-content a:VISITED { 21 | color: #018cbc; 22 | } 23 | 24 | #glyrics-content::-webkit-scrollbar-thumb { 25 | border-color: #CFCFCF; 26 | background-color: #CFCFCF; 27 | } 28 | 29 | #glyrics-content::-webkit-scrollbar-track { 30 | background-color: #EEEEEE; 31 | } 32 | 33 | #glyrics-content::-webkit-scrollbar-corner { 34 | background-color: #EEEEEE; 35 | } -------------------------------------------------------------------------------- /glyrics-ext/wynk/wynk.css: -------------------------------------------------------------------------------- 1 | #lyrics-container { 2 | color: black; 3 | background-color: white; 4 | border-color: #F44336; 5 | } 6 | 7 | #lyrics-topbar { 8 | color: white; 9 | background-color: #F44336; 10 | } 11 | 12 | #glyrics-content,#glyrics-content * { 13 | color: black; 14 | } 15 | 16 | #glyrics-content a:LINK { 17 | color: #018cbc; 18 | } 19 | 20 | #glyrics-content a:VISITED { 21 | color: #018cbc; 22 | } 23 | 24 | #glyrics-content::-webkit-scrollbar-thumb { 25 | border-color: #CFCFCF; 26 | background-color: #CFCFCF; 27 | } 28 | 29 | #glyrics-content::-webkit-scrollbar-track { 30 | background-color: #EEEEEE; 31 | } 32 | 33 | #glyrics-content::-webkit-scrollbar-corner { 34 | background-color: #EEEEEE; 35 | } -------------------------------------------------------------------------------- /glyrics-ext/8tracks/8tracks.css: -------------------------------------------------------------------------------- 1 | #lyrics-container { 2 | color: black; 3 | background-color: white; 4 | border-color: #505E7B; 5 | } 6 | 7 | #lyrics-topbar { 8 | color: white; 9 | background-color: #505E7B; 10 | } 11 | 12 | #glyrics-content,#glyrics-content * { 13 | color: black; 14 | } 15 | 16 | #glyrics-content a:LINK { 17 | color: #371232; 18 | } 19 | 20 | #glyrics-content a:VISITED { 21 | color: #371232; 22 | } 23 | 24 | #glyrics-content::-webkit-scrollbar-thumb { 25 | border-color: #999999; 26 | background-color: #999999; 27 | } 28 | 29 | #glyrics-content::-webkit-scrollbar-track { 30 | background-color: #FFFFFF; 31 | } 32 | 33 | #glyrics-content::-webkit-scrollbar-corner { 34 | background-color: #FFFFFF; 35 | } -------------------------------------------------------------------------------- /glyrics-ext/deezer/deezer.css: -------------------------------------------------------------------------------- 1 | #lyrics-container { 2 | color: black; 3 | background-color: white; 4 | border-color: #0B66CD; 5 | } 6 | 7 | #lyrics-topbar { 8 | color: white; 9 | background-color: #0B66CD; 10 | } 11 | 12 | #glyrics-content,#glyrics-content * { 13 | color: black; 14 | } 15 | 16 | #glyrics-content a:LINK { 17 | color: #0B66CD; 18 | } 19 | 20 | #glyrics-content a:VISITED { 21 | color: #0B66CD; 22 | } 23 | 24 | #glyrics-content::-webkit-scrollbar-thumb { 25 | border-color: #999999; 26 | background-color: #999999; 27 | } 28 | 29 | #glyrics-content::-webkit-scrollbar-track { 30 | background-color: #FFFFFF; 31 | } 32 | 33 | #glyrics-content::-webkit-scrollbar-corner { 34 | background-color: #FFFFFF; 35 | } -------------------------------------------------------------------------------- /glyrics-ext/earbits/earbits.css: -------------------------------------------------------------------------------- 1 | #lyrics-container { 2 | color: black; 3 | background-color: white; 4 | border-color: #0477a7; 5 | } 6 | 7 | #lyrics-topbar { 8 | color: white; 9 | background-color: #0477a7; 10 | } 11 | 12 | #glyrics-content,#glyrics-content * { 13 | color: black; 14 | } 15 | 16 | #glyrics-content a:LINK { 17 | color: #018cbc; 18 | } 19 | 20 | #glyrics-content a:VISITED { 21 | color: #018cbc; 22 | } 23 | 24 | #glyrics-content::-webkit-scrollbar-thumb { 25 | border-color: #CFCFCF; 26 | background-color: #CFCFCF; 27 | } 28 | 29 | #glyrics-content::-webkit-scrollbar-track { 30 | background-color: #EEEEEE; 31 | } 32 | 33 | #glyrics-content::-webkit-scrollbar-corner { 34 | background-color: #EEEEEE; 35 | } -------------------------------------------------------------------------------- /glyrics-ext/groove/groove.css: -------------------------------------------------------------------------------- 1 | #lyrics-container { 2 | color: black; 3 | background-color: white; 4 | border-color: #0078d7; 5 | } 6 | 7 | #lyrics-topbar { 8 | color: white; 9 | background-color: #0078d7; 10 | } 11 | 12 | #glyrics-content,#glyrics-content * { 13 | color: black; 14 | } 15 | 16 | #glyrics-content a:LINK { 17 | color: #cc6d1d; 18 | } 19 | 20 | #glyrics-content a:VISITED { 21 | color: #cc6d1d; 22 | } 23 | 24 | #glyrics-content::-webkit-scrollbar-thumb { 25 | border-color: #CFCFCF; 26 | background-color: #CFCFCF; 27 | } 28 | 29 | #glyrics-content::-webkit-scrollbar-track { 30 | background-color: #EEEEEE; 31 | } 32 | 33 | #glyrics-content::-webkit-scrollbar-corner { 34 | background-color: #EEEEEE; 35 | } -------------------------------------------------------------------------------- /glyrics-ext/jango/jango.css: -------------------------------------------------------------------------------- 1 | #lyrics-container { 2 | color: black; 3 | background-color: white; 4 | border-color: #0F2238; 5 | } 6 | 7 | #lyrics-topbar { 8 | color: white; 9 | background-color: #0F2238 ; 10 | } 11 | 12 | #glyrics-content,#glyrics-content * { 13 | color: black; 14 | } 15 | 16 | #glyrics-content a:LINK { 17 | color: #38597F; 18 | } 19 | 20 | #glyrics-content a:VISITED { 21 | color: #38597F; 22 | } 23 | 24 | #glyrics-content::-webkit-scrollbar-thumb { 25 | border-color: #CFCFCF; 26 | background-color: #CFCFCF; 27 | } 28 | 29 | #glyrics-content::-webkit-scrollbar-track { 30 | background-color: #EEEEEE; 31 | } 32 | 33 | #glyrics-content::-webkit-scrollbar-corner { 34 | background-color: #EEEEEE; 35 | } -------------------------------------------------------------------------------- /glyrics-ext/slacker/slacker.css: -------------------------------------------------------------------------------- 1 | #lyrics-container { 2 | color: black; 3 | background-color: white; 4 | border-color: #e21c2b; 5 | } 6 | 7 | #lyrics-topbar { 8 | color: white; 9 | background-color: #e21c2b; 10 | } 11 | 12 | #glyrics-content,#glyrics-content * { 13 | color: black; 14 | } 15 | 16 | #glyrics-content a:LINK { 17 | color: #e21c2b; 18 | } 19 | 20 | #glyrics-content a:VISITED { 21 | color: #e21c2b; 22 | } 23 | 24 | #glyrics-content::-webkit-scrollbar-thumb { 25 | border-color: #999999; 26 | background-color: #999999; 27 | } 28 | 29 | #glyrics-content::-webkit-scrollbar-track { 30 | background-color: #FFFFFF; 31 | } 32 | 33 | #glyrics-content::-webkit-scrollbar-corner { 34 | background-color: #FFFFFF; 35 | } -------------------------------------------------------------------------------- /glyrics-ext/AccuRadio/AccuRadio.css: -------------------------------------------------------------------------------- 1 | #lyrics-container { 2 | color: black; 3 | background-color: white; 4 | border-color: #505E7B; 5 | } 6 | 7 | #lyrics-topbar { 8 | color: white; 9 | background-color: #505E7B; 10 | } 11 | 12 | #glyrics-content,#glyrics-content * { 13 | color: black; 14 | } 15 | 16 | #glyrics-content a:LINK { 17 | color: #371232; 18 | } 19 | 20 | #glyrics-content a:VISITED { 21 | color: #371232; 22 | } 23 | 24 | #glyrics-content::-webkit-scrollbar-thumb { 25 | border-color: #999999; 26 | background-color: #999999; 27 | } 28 | 29 | #glyrics-content::-webkit-scrollbar-track { 30 | background-color: #FFFFFF; 31 | } 32 | 33 | #glyrics-content::-webkit-scrollbar-corner { 34 | background-color: #FFFFFF; 35 | } -------------------------------------------------------------------------------- /glyrics-ext/amazonmusic/amazonmusic.css: -------------------------------------------------------------------------------- 1 | #lyrics-container { 2 | color: black; 3 | background-color: white; 4 | border-color: #f90; 5 | } 6 | 7 | #lyrics-topbar { 8 | color: white; 9 | background-color: #f90; 10 | } 11 | 12 | #glyrics-content,#glyrics-content * { 13 | color: black; 14 | } 15 | 16 | #glyrics-content a:LINK { 17 | color: #48a3c6; 18 | } 19 | 20 | #glyrics-content a:VISITED { 21 | color: #48a3c6; 22 | } 23 | 24 | #glyrics-content::-webkit-scrollbar-thumb { 25 | border-color: #CFCFCF; 26 | background-color: #CFCFCF; 27 | } 28 | 29 | #glyrics-content::-webkit-scrollbar-track { 30 | background-color: #EEEEEE; 31 | } 32 | 33 | #glyrics-content::-webkit-scrollbar-corner { 34 | background-color: #EEEEEE; 35 | } -------------------------------------------------------------------------------- /glyrics-ext/googlemusic/googlemusic.css: -------------------------------------------------------------------------------- 1 | #lyrics-container { 2 | color: black; 3 | background-color: white; 4 | border-color: #F44336; 5 | } 6 | 7 | #lyrics-topbar { 8 | color: white; 9 | background-color: #F44336; 10 | } 11 | 12 | #glyrics-content,#glyrics-content * { 13 | color: black; 14 | } 15 | 16 | #glyrics-content a:LINK { 17 | color: #cc6d1d; 18 | } 19 | 20 | #glyrics-content a:VISITED { 21 | color: #cc6d1d; 22 | } 23 | 24 | #glyrics-content::-webkit-scrollbar-thumb { 25 | border-color: #CFCFCF; 26 | background-color: #CFCFCF; 27 | } 28 | 29 | #glyrics-content::-webkit-scrollbar-track { 30 | background-color: #EEEEEE; 31 | } 32 | 33 | #glyrics-content::-webkit-scrollbar-corner { 34 | background-color: #EEEEEE; 35 | } -------------------------------------------------------------------------------- /docs/_includes/footer.html: -------------------------------------------------------------------------------- 1 | 2 | 20 | -------------------------------------------------------------------------------- /glyrics-ext/plex/plex.css: -------------------------------------------------------------------------------- 1 | #lyrics-container { 2 | color: white; 3 | background-color: #1f1f1f; 4 | border-color: #cc7b19; 5 | } 6 | 7 | #lyrics-topbar { 8 | color: white; 9 | font-size: 13px; 10 | background-color: #cc7b19; 11 | } 12 | 13 | #glyrics-content,#glyrics-content * { 14 | color: white; 15 | } 16 | 17 | #glyrics-content a:LINK { 18 | color: #f9be03; 19 | } 20 | 21 | #glyrics-content a:VISITED { 22 | color: #f9be03; 23 | } 24 | 25 | #glyrics-content::-webkit-scrollbar-thumb { 26 | border-color: #353535; 27 | background-color: #353535; 28 | } 29 | 30 | #glyrics-content::-webkit-scrollbar-track { 31 | background-color: #131313; 32 | } 33 | 34 | #glyrics-content::-webkit-scrollbar-corner { 35 | background-color: #131313; 36 | } -------------------------------------------------------------------------------- /glyrics-ext/saavn/saavn.css: -------------------------------------------------------------------------------- 1 | #lyrics-container { 2 | color: black; 3 | background-color: white; 4 | border-color: #30b55a; 5 | } 6 | 7 | #lyrics-topbar { 8 | color: white; 9 | font-size: 14px; 10 | background-color: #30b55a; 11 | } 12 | 13 | #glyrics-content,#glyrics-content * { 14 | color: black; 15 | } 16 | 17 | #glyrics-content a:LINK { 18 | color: #3b5998; 19 | } 20 | 21 | #glyrics-content a:VISITED { 22 | color: #3b5998; 23 | } 24 | 25 | #glyrics-content::-webkit-scrollbar-thumb { 26 | border-color: #CFCFCF; 27 | background-color: #CFCFCF; 28 | } 29 | 30 | #glyrics-content::-webkit-scrollbar-track { 31 | background-color: #EEEEEE; 32 | } 33 | 34 | #glyrics-content::-webkit-scrollbar-corner { 35 | background-color: #EEEEEE; 36 | } -------------------------------------------------------------------------------- /glyrics-ext/pandora/pandora.css: -------------------------------------------------------------------------------- 1 | #lyrics-container { 2 | color: black; 3 | background-color: #DADDE3; 4 | border-color: #174C78; 5 | } 6 | 7 | #lyrics-topbar { 8 | color: white; 9 | font-size: 13px; 10 | background-color: #174C78; 11 | } 12 | 13 | #glyrics-content,#glyrics-content * { 14 | color: black; 15 | } 16 | 17 | #glyrics-content a:LINK { 18 | color: #01244b; 19 | } 20 | 21 | #glyrics-content a:VISITED { 22 | color: #01244b; 23 | } 24 | 25 | #glyrics-content::-webkit-scrollbar-thumb { 26 | border-color: #999B9F; 27 | background-color: #999B9F; 28 | } 29 | 30 | #glyrics-content::-webkit-scrollbar-track { 31 | background-color: #ECEEF1; 32 | } 33 | 34 | #glyrics-content::-webkit-scrollbar-corner { 35 | background-color: #ECEEF1; 36 | } -------------------------------------------------------------------------------- /glyrics-ext/spotify/spotify.css: -------------------------------------------------------------------------------- 1 | #lyrics-container { 2 | color: black; 3 | background-color: #121314; 4 | border-color: #354C00; 5 | } 6 | 7 | #lyrics-topbar { 8 | color: black; 9 | font-weight: bold; 10 | background-color: #6A9700; 11 | } 12 | 13 | #glyrics-content,#glyrics-content * { 14 | color: white; 15 | } 16 | 17 | #glyrics-content a:LINK { 18 | color: #CEE599; 19 | } 20 | 21 | #glyrics-content a:VISITED { 22 | color: #CEE599; 23 | } 24 | 25 | #glyrics-content::-webkit-scrollbar-thumb { 26 | border-color: #323438; 27 | background-color: #323438; 28 | } 29 | 30 | #glyrics-content::-webkit-scrollbar-track { 31 | background-color: #1c1c1f; 32 | } 33 | 34 | #glyrics-content::-webkit-scrollbar-corner { 35 | background-color: #1c1c1f; 36 | } -------------------------------------------------------------------------------- /glyrics-ext/raaga/raaga.css: -------------------------------------------------------------------------------- 1 | #lyrics-container { 2 | color: black; 3 | background-color: white; 4 | border-color: #475cb2; 5 | } 6 | 7 | #lyrics-topbar { 8 | color: white; 9 | background-color: #475cb2; 10 | } 11 | 12 | #glyrics-content,#glyrics-content * { 13 | color: black; 14 | } 15 | 16 | #glyrics-content a:LINK { 17 | color: #fa3861; 18 | } 19 | 20 | #glyrics-content a:VISITED { 21 | color: #fa3861; 22 | } 23 | 24 | #glyrics-content::-webkit-scrollbar-thumb { 25 | border-color: #CFCFCF; 26 | background-color: #CFCFCF; 27 | } 28 | 29 | #glyrics-content::-webkit-scrollbar-track { 30 | background-color: #EEEEEE; 31 | } 32 | 33 | #glyrics-content::-webkit-scrollbar-corner { 34 | background-color: #EEEEEE; 35 | } -------------------------------------------------------------------------------- /glyrics-ext/saavn/extract_track_info.js: -------------------------------------------------------------------------------- 1 | //Get song information from grooveshark.com page 2 | function fetchTrackInfo() { 3 | songName = ''; 4 | album = ''; 5 | firstArtist = ''; 6 | artists = ''; 7 | 8 | songName = $('#player-track-name').text().trim(); 9 | album = $('#player-album-name').text().trim(); 10 | extractTracksFromPage(); 11 | } 12 | 13 | function extractTracksFromPage() { 14 | songJSONDivs = $(".song-json"); 15 | for (var i = 0; i < songJSONDivs.length; i++) { 16 | obj = eval("(" + songJSONDivs[i].innerText + ")"); 17 | if (obj.title.trim() === songName.trim()) { 18 | singers = obj.singers; 19 | commaIndex = singers.indexOf(","); 20 | firstArtist = (commaIndex === -1)?singers:singers.substring(0, commaIndex); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /glyrics-ext/ytmusic/ytmusic.css: -------------------------------------------------------------------------------- 1 | #lyrics-container { 2 | color: white; 3 | background-color: #414141; 4 | border-width: 0px; 5 | box-shadow:rgba(0, 0, 0, 0.3) 0px 0px 5px 3px 6 | } 7 | 8 | #lyrics-topbar { 9 | color: white; 10 | background-color: #ff3939; 11 | } 12 | 13 | #glyrics-content,#glyrics-content * { 14 | color: white; 15 | } 16 | 17 | #glyrics-content a:LINK { 18 | color: #aaa; 19 | } 20 | 21 | #glyrics-content a:VISITED { 22 | color: #aaa; 23 | } 24 | 25 | #glyrics-content::-webkit-scrollbar-thumb { 26 | border-color: #777777; 27 | background-color: #777777; 28 | } 29 | 30 | #glyrics-content::-webkit-scrollbar-track { 31 | background-color: #414141; 32 | } 33 | 34 | #glyrics-content::-webkit-scrollbar-corner { 35 | background-color: #414141; 36 | } -------------------------------------------------------------------------------- /glyrics-ext/iheart/iheart.css: -------------------------------------------------------------------------------- 1 | #lyrics-container { 2 | color: #555; 3 | background-color: white; 4 | border-width: 0px; 5 | box-shadow:rgba(0, 0, 0, 0.3) 0px 0px 5px 3px; 6 | border-color: #c6002b; 7 | } 8 | 9 | #lyrics-topbar { 10 | color: white; 11 | background-color: #c6002b; 12 | } 13 | 14 | #glyrics-content,#glyrics-content * { 15 | color: #444; 16 | } 17 | 18 | #glyrics-content a:LINK { 19 | color: #aaa; 20 | } 21 | 22 | #glyrics-content a:VISITED { 23 | color: #aaa; 24 | } 25 | 26 | #glyrics-content::-webkit-scrollbar-thumb { 27 | border-color: #ccc; 28 | background-color: #ccc; 29 | } 30 | 31 | #glyrics-content::-webkit-scrollbar-track { 32 | background-color: white; 33 | } 34 | 35 | #glyrics-content::-webkit-scrollbar-corner { 36 | background-color: white; 37 | } -------------------------------------------------------------------------------- /glyrics-ext/gaana/gaana.css: -------------------------------------------------------------------------------- 1 | #lyrics-container { 2 | color: black; 3 | background-color: white; 4 | border-color: #fb4337; 5 | } 6 | 7 | #lyrics-topbar { 8 | color: white; 9 | background-color: #fb4337; 10 | } 11 | 12 | #glyrics-content, #glyrics-content * { 13 | color: black; 14 | } 15 | 16 | #glyrics-content a:LINK { 17 | color: #FF3300; 18 | } 19 | 20 | #glyrics-content a:VISITED { 21 | color: #FF3300; 22 | } 23 | 24 | #glyrics-content::-webkit-scrollbar-thumb { 25 | border-color: #CFCFCF; 26 | background-color: #CFCFCF; 27 | } 28 | 29 | #glyrics-content::-webkit-scrollbar-track { 30 | background-color: #EEEEEE; 31 | } 32 | 33 | #glyrics-content::-webkit-scrollbar-corner { 34 | background-color: #EEEEEE; 35 | } -------------------------------------------------------------------------------- /glyrics-ext/soundcloud/soundcloud.css: -------------------------------------------------------------------------------- 1 | #lyrics-container { 2 | color: black; 3 | background-color: white; 4 | border-color: #F76700; 5 | } 6 | 7 | #lyrics-topbar { 8 | color: white; 9 | font-size: 14px; 10 | background-color: #F76700; 11 | background-image:linear-gradient(#F76700,#FA3219); 12 | } 13 | 14 | #glyrics-content,#glyrics-content * { 15 | color: black; 16 | } 17 | 18 | #glyrics-content a:LINK { 19 | color: #C53421; 20 | } 21 | 22 | #glyrics-content a:VISITED { 23 | color: #C53421; 24 | } 25 | 26 | #glyrics-content::-webkit-scrollbar-thumb { 27 | border-color: #CFCFCF; 28 | background-color: #CFCFCF; 29 | } 30 | 31 | #glyrics-content::-webkit-scrollbar-track { 32 | background-color: #EEEEEE; 33 | } 34 | 35 | #glyrics-content::-webkit-scrollbar-corner { 36 | background-color: #EEEEEE; 37 | } -------------------------------------------------------------------------------- /docs/airspace-jekyll.gemspec: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | Gem::Specification.new do |spec| 4 | spec.name = "airspace-jekyll" 5 | spec.version = "0.1.0" 6 | spec.authors = ["LuminousRubyist"] 7 | spec.email = ["LuminousRubyist@users.noreply.github.com"] 8 | 9 | spec.summary = %q{A port of ThemeFisher's Airspace theme. https://github.com/themefisher/airspace-free-html5-agency-template} 10 | spec.homepage = "http://example.com" 11 | spec.license = "MIT" 12 | 13 | spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r{^(_layouts|_includes|_sass|LICENSE|README)/i}) } 14 | 15 | spec.add_development_dependency "jekyll", "~> 3.2" 16 | spec.add_development_dependency "bundler", "~> 1.12" 17 | spec.add_development_dependency "rake", "~> 10.0" 18 | end 19 | -------------------------------------------------------------------------------- /docs/contact.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Contact us! 4 | permalink: /contact/ 5 | --- 6 | 7 |
8 | 9 |
10 |
11 |
12 | 13 | 14 | 19 | 22 |
23 |
24 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8.11.3 2 | 3 | RUN apt-get update && \ 4 | apt-get -y install xvfb gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 \ 5 | libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 \ 6 | libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \ 7 | libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 \ 8 | libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget && \ 9 | rm -rf /var/lib/apt/lists/* 10 | 11 | # Add user so we don't need --no-sandbox. 12 | RUN groupadd -r pptruser && useradd -r -g pptruser -G audio,video pptruser \ 13 | && mkdir -p /home/pptruser/Downloads \ 14 | && chown -R pptruser:pptruser /home/pptruser 15 | 16 | # Run everything after as non-privileged user. 17 | USER pptruser -------------------------------------------------------------------------------- /scripts/create_zip_glyrics_ext.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var archiver = require('archiver'); 3 | var config = require('.././glyrics-ext/manifest.json'); 4 | var targetDir = __dirname + '/../target'; 5 | 6 | if (!fs.existsSync(targetDir)){ 7 | fs.mkdirSync(targetDir); 8 | } 9 | 10 | var fileName = targetDir + '/glyrics_ext_'+config.version+'.zip' 11 | var fileOutput = fs.createWriteStream(fileName); 12 | var archive = archiver('zip', { 13 | zlib: { level: 9 } // Sets the compression level. 14 | }); 15 | 16 | fileOutput.on('close', function () { 17 | console.log(archive.pointer() + ' total bytes'); 18 | console.log('archiver has been finalized and the output file descriptor has closed.'); 19 | }); 20 | 21 | fs.d 22 | 23 | archive.pipe(fileOutput); 24 | archive.directory("glyrics-ext/", false); 25 | archive.on('error', function(err){ 26 | throw err; 27 | }); 28 | archive.finalize(); 29 | 30 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "glyrics", 3 | "version": "1.0.0", 4 | "description": "Gaana Lyrics chrome extension", 5 | "main": "", 6 | "directories": { 7 | "doc": "docs" 8 | }, 9 | "scripts": { 10 | "build": "node ./scripts/create_zip_glyrics_ext.js", 11 | "test": "mocha --recursive" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "git+https://github.com/samik-saha/glyrics.git" 16 | }, 17 | "keywords": [ 18 | "chrome-extension", 19 | "lyrics", 20 | "nodejs" 21 | ], 22 | "author": "Samik Saha", 23 | "license": "ISC", 24 | "bugs": { 25 | "url": "https://github.com/samik-saha/glyrics/issues" 26 | }, 27 | "homepage": "https://github.com/samik-saha/glyrics#readme", 28 | "dependencies": { 29 | "archiver": "^3.0.0", 30 | "puppeteer": "^1.13.0", 31 | "zip-folder": "^1.0.0" 32 | }, 33 | "devDependencies": { 34 | "chai": "^4.2.0", 35 | "mocha": "^10.2.0" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /docs/js/main.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | 3 | 4 | $("#portfolio-contant-active").mixItUp(); 5 | 6 | 7 | $("#testimonial-slider").owlCarousel({ 8 | paginationSpeed : 500, 9 | singleItem:true, 10 | autoPlay: 3000, 11 | }); 12 | 13 | 14 | 15 | 16 | $("#clients-logo").owlCarousel({ 17 | autoPlay: 3000, 18 | items : 5, 19 | itemsDesktop : [1199,5], 20 | itemsDesktopSmall : [979,5], 21 | }); 22 | 23 | $("#works-logo").owlCarousel({ 24 | autoPlay: 3000, 25 | items : 5, 26 | itemsDesktop : [1199,5], 27 | itemsDesktopSmall : [979,5], 28 | }); 29 | 30 | 31 | // google map 32 | var map; 33 | function initMap() { 34 | map = new google.maps.Map(document.getElementById('map'), { 35 | center: {lat: -34.397, lng: 150.644}, 36 | zoom: 8 37 | }); 38 | } 39 | 40 | 41 | // Counter 42 | 43 | $('.counter').counterUp({ 44 | delay: 10, 45 | time: 1000 46 | }); 47 | 48 | 49 | }); 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /glyrics-app/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Gaana Lyrics App", 3 | "short_name": "Gaana Lyrics", 4 | "description": "View lyrics in a always-on-top window for Gaana.com, Saavn, Spotify, Google Music, Rdio, and others. (Requires GLyrics Extension)", 5 | "author": "Samik", 6 | "version": "2.6", 7 | "app": { 8 | "background": { 9 | "scripts": ["background.js"] 10 | } 11 | }, 12 | "icons": { 13 | "64": "images/icon64.png", 14 | "128": "images/icon128.png" 15 | }, 16 | "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmelSsRL1JkcXTkrvlnhjm/BdyPPuJNT7Qq005jhE650WnUMV5Y4I1hUfel22KM0rRq2RbsE5B90gP4WnKn6uCC4fB5axWih33I28TimxDFjwCylwFHbk9JGK+V6xPAed6SMomstNyQVbMqGOp0S1Md1BumlI6xlc6B+S1s+a5FBY4Hocq4FLf+ER3ZYHlZbuBY5stM7A9rMZonYznlATjeW4xxbLOCkAHP2g8qjEb08fu5CLr3IkQsK/1Ms9H8IW76UMmLj/qhXPjaPs7Yyv6pHUTlK479+f4n6Zpf4tjOlknZf4IvMdRKTX5uSkBK90d9pjx6lf9fTXhYcV9sqN2QIDAQAB", 17 | "permissions": [ 18 | "http://*/*", 19 | "https://*/*", 20 | "alwaysOnTopWindows", 21 | "storage" 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /glyrics-ext/soundcloud/extract_track_info.js: -------------------------------------------------------------------------------- 1 | //Get song information from grooveshark.com page 2 | function fetchTrackInfo(){ 3 | var playbackTitle = $('.playbackSoundBadge__title a').attr('title'); 4 | var playbackArtist = $('.playbackSoundBadge__lightLink').attr('title'); 5 | 6 | if (playbackTitle){ 7 | songName = ''; 8 | album = ''; 9 | firstArtist = ''; 10 | artists = ''; 11 | 12 | /* SoundClould titles are generally of the format "artist - track". 13 | Lets split them */ 14 | var arr = playbackTitle.split("-"); 15 | 16 | if (arr.length > 1) { 17 | /* Sometimes the title will have additional text inside "[]". 18 | Lets remove it and finally trim it of spaces*/ 19 | songName = arr[1].replace(/\[.*\]/g, "").trim(); 20 | 21 | /* Remove any prefix with the format "text:" from artist name */ 22 | firstArtist = arr[0].replace(/^.*:/g, "") 23 | .replace(/\(.*\)/g, "").trim(); 24 | } else if (arr.length === 1){ 25 | songName = arr[0]; 26 | firstArtist=playbackArtist; 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | 2 | exclude: 3 | - "/vendor/" 4 | - "Gemfile" 5 | - "Gemfile.lock" 6 | - "README.md" 7 | - "LICENSE.md" 8 | - "*.gemspec" 9 | 10 | keep_files: 11 | - "CNAME" 12 | - ".git" 13 | - ".gitignore" 14 | 15 | 16 | # Site settings 17 | title: Gaana Lyrics 18 | subtitle: "A browser extension to display lyrics on music sites" 19 | # Base URL of site. It should always start with a slash, 20 | # and never end with a slash. Set it to a blank value if hosting at the 21 | # root of your server. 22 | # baseurl: "/" # the subpath of your site 23 | url: "http://samik-saha.github.io" # the base hostname & protocol for your site 24 | baseurl: "/glyrics" 25 | cover: "/assets/cover.png" 26 | logo: "/assets/logo.png" 27 | 28 | # Build settings 29 | markdown: kramdown 30 | 31 | # Google analytics 32 | # ga_tracking_id: "UA-XXXX-1" 33 | 34 | # Category descriptions (for archive pages) 35 | descriptions: 36 | - cat: jekyll 37 | desc: "Posts describing Jekyll setup techniques." 38 | 39 | - cat: dummy 40 | desc: "Just some placeholder posts, lorem ipsum and the rest." 41 | -------------------------------------------------------------------------------- /glyrics-ext/spotify/extract_track_info.js: -------------------------------------------------------------------------------- 1 | //Get song information from Spotify 2 | function fetchTrackInfo() { 3 | window.songName = ''; 4 | window.album = ''; 5 | window.firstArtist = ''; 6 | window.artists = ''; 7 | 8 | var trackName, trackArtist; 9 | 10 | if (window.location.hostname == "play.spotify.com") { 11 | trackName = $('#app-player').contents().find('#track-name a:first').text().trim(); 12 | trackArtist = $('#app-player').contents().find('#track-artist a:first').text().trim(); 13 | } 14 | else if (window.location.hostname == "player.spotify.com") { 15 | trackName = $('#main').contents().find('#view-now-playing .track span:first').text().trim(); 16 | trackArtist = $('#main').contents().find('#view-now-playing .artist span:first').text().trim(); 17 | } 18 | else { 19 | trackName = $(".track-info .track-info__name:first").text().trim(); 20 | trackArtist = $(".track-info .track-info__artists:first").text().trim(); 21 | } 22 | 23 | window.songName = trackName; 24 | window.firstArtist = trackArtist; 25 | } 26 | -------------------------------------------------------------------------------- /docs/LICENSE.md: -------------------------------------------------------------------------------- 1 | Terms and Conditions for Free Templates - from https://www.themefisher.com/license 2 | ================================================================================== 3 | 1. You cannot remove the copyright link to Themefisher without buying the license. 4 | 2. You have the rights to use the templates for personal and commercial project(s). 5 | 3. You are allowed to make necessary modification(s) to our templates to fit your purpose. 6 | 4. Modification of the template or part it does not grant ownership of the template. 7 | 5. You cannot resell, redistribute, or sub-license any of Themefisher’s templates. 8 | 6. You can host Themefisher template to your website with full author credit 9 | 7. You are most welcome to share our templates with your clients/friends, but please share our license with them so that they can be aware of our copyrights. 10 | 8. You can convert our templates on any CMS (like WordPress, Joomla etc.) for your client and personal purposes but cannot resell these templates after the CMS conversion. 11 | 12 | This jekyll port is not associated with ThemeFisher. All design credit to the original authors of this template. 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Gaana Lyrics App and Extensions 2 | 3 | ### Gaana Lyrics Extension 4 | 5 | Get your favourite song's lyrics on Gaana.com, Google Music, Spotify, Pandora, Groove and many other streaming music services without leaving the page. This extension displays the lyrics for currently playing song in a semi-transparent overlay window. 6 | 7 | FEATURES: 8 | 9 | * Searches and retrieves lyrics from LyricWiki 10 | * Changes automatically on track change 11 | * Launch when required by clicking address bar icon 12 | * If any lyric is not found, it gives you an link to add the lyrics yourself. 13 | * Lyric window is resizeable and movable 14 | * Customize color and font 15 | 16 | ### Gaana Lyrics App 17 | View lyrics in a floating window that remains always on top of other windows 18 | 19 | ### Supported Sites 20 | 21 | 1. Gaana.com 22 | 2. Spotify Web Player 23 | 3. Saavn 24 | 4. SoundCloud 25 | 5. Raaga 26 | 6. Amazon Prime Music 27 | 7. Google Music 28 | 8. Earbits 29 | 9. Pandora Radio 30 | 10. Plex Web 31 | 11. AccuRadio 32 | 12. Slacker Radio 33 | 13. Jango 34 | 14. 8tracks 35 | 15. Deezer 36 | 16. Tidal 37 | 17. Wynk 38 | 18. Groove 39 | 19. YouTube Music 40 | 41 | ### Build 42 | npm run-script build -------------------------------------------------------------------------------- /docs/blog.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Blog 4 | permalink: /blog/ 5 | --- 6 | 7 | 19 |
20 |
21 | 22 | 23 | 28 | 31 |
32 |
33 | {% for post in site.posts %} 34 |
35 | {{ post.title }} 36 |

{{ post.date | date_to_long_string }}

37 |

38 | {{ post.content | strip_html | truncatewords: 50 }} 39 |

40 |
41 | {% endfor %} 42 | -------------------------------------------------------------------------------- /docs/_layouts/post.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | --- 4 | 5 |
6 | 7 |
8 |
9 |
10 |
11 |
12 |

{{ page.title }}

13 | 16 |
17 |

{{ content }}

18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | 26 | 27 | 32 | 35 |
36 |
37 |
38 |

39 | Back to blog 40 |

41 | -------------------------------------------------------------------------------- /glyrics-ext/gaana/extract_track_info.js: -------------------------------------------------------------------------------- 1 | //Get song information from Gaana.com page 2 | function fetchTrackInfo(){ 3 | var prevSongName=window.songName; 4 | window.songName = ''; 5 | window.album = ''; 6 | window.artists = ''; 7 | 8 | songName = $('#stitle').first().text().trim() 9 | album = $('#atitle').first().text().trim() 10 | 11 | /* Ignore Gaana Promotional */ 12 | if (songName === "Gaana Promotional"){ 13 | songName = prevSongName; 14 | } 15 | 16 | //if song changed and artist is null 17 | if (window.songName !== prevSongName){ 18 | window.firstArtist = ''; 19 | //Look for artist elsewhere in the page 20 | extractTracksFromPage(); 21 | } 22 | } 23 | 24 | 25 | /* 26 | Although artist name is not displayed, it might be available elsewhere in the page 27 | This function finds all songs listed in the page and extracts the artist for the current song. 28 | */ 29 | function extractTracksFromPage(){ 30 | var allSpans = document.getElementsByTagName("span"); 31 | var songJSON=[]; 32 | 33 | for (var i=0;i=0){ 35 | songJSON.push(allSpans[i].innerText); 36 | } 37 | } 38 | 39 | for (i=0;i 2 |
3 |
4 |
5 |
6 | 7 | 33 |
34 |
35 |
36 |
37 | -------------------------------------------------------------------------------- /glyrics-app/key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC6W7hcvRu8xYKB 3 | y0bD53q1uHRK/WNyqi3+/75ipClp66i8Bd2WC0BpO5fZPXWfF3cFwXNxaP3e6/Ld 4 | mW58xulHTIU4reqkhRfbZRElaek9m0TdPDmnnQCePcKhFwuUlyZ7BtYJjVuARLmy 5 | l0ZkTgnwWnIAp01qiL/3KnugEm2Jvh/HWP4Rwo2rLG/slQtA+7WOm0ERr8V/SCNd 6 | qhOYjSSVxkcJF6u0h7rqrQCnINRqn0Z4eyu0D/j8SLTY45UICNF/NgBT1QXvZPCn 7 | D894WpyWAI5cw6I6rgGvXlhHoT6+uEB+xt+PD8kq04X69sgRWWPLe42v7Lrd8J6D 8 | OqP9B41fAgMBAAECggEAOKWCr+Xn1YSv++YfV5M4UJ6F8vl8zjD+lEGGzJMb549z 9 | lduulFpNNO+hY65z320Rh9Va0wFYEffktgladWE9LagL4sOyzFmMe+sHwDimZkyZ 10 | LSqOV+24b2FUlQTdR0h+sOzOCM9IHgBF9gxXoEu8Z6wGdT5loNl6iJYISArx8ukr 11 | tmacRxl/1sVjz3jQhBO0+PHljorVrF1MS6bBiuLjTcOI+zI8CcTaCxdvbiYcqRaA 12 | BKaYPxRgjB5ctIXun9DDY8q34WWdF0yY7WC95gBof1lJmdgrkT5f0equNkWcFyLa 13 | StjdDRreiKeLj1iZoyg68+aDHEATuDkn0vIInspNmQKBgQDrREs2P+h9wXFQEAp5 14 | ZgbkCuwGk4DUUX1Kru+7DIAWNSZqDvs1Jvlb1vBJK8nwbXt+FW3N016Rczriv9bW 15 | nWD/fpQ8q1hS0TBTP2sdVhvuiaURDUvdNEiKv4bmXDZIuBv0bdIudD8kfd5ic8vL 16 | oqQm3f50uRK68t9NadOSHkt96wKBgQDKyAhWARgUqhC6j4takp3Uu0dPkACZeEnh 17 | a/RnM5f7uP0FiZZPnXd/3DCmSvZRzxFXLsEtBfcMKPudCd1mU/F6biUJ/SeICxm3 18 | HpqXci973oI1oI8ghF+DjXZri9YN+5+1vezQy41zhw9GQ9c5mu3bZs6FEWLPK+Nz 19 | qp43zsmtXQKBgHZ4u48j+4VoJhF1InEjiZDIVzawjI1eQ8OZ+CqvDskgFqoNxT5s 20 | 0+EFiZavME+cMjW5wMOHDvYbmqmYhS0przC5oxgyCJYbtUQWiXAKbqJeOfsuQOex 21 | bl5AOEREZymTXLBnpRGzhCByKcxWF2gCDLttyrcog2AU8ZHgGqRYERflAoGAYk3k 22 | 1KTFIsdrQrXx7Z+kSgvcPzLlR4Er988Y9arqZArDBpsztjb1RpPdNdCjZveGRYiR 23 | 95yrrkZz7CZrIX9SUnLxG82RC3+uILsCYKbnZBpzb0H+ANqLX0AGB48L3017mGSR 24 | WItFcJsqCXs77F4yLynAtnu+Ngblxh4Rg6aI2LUCgYEAyMfynwxmQc2Gs7i/Py2Z 25 | gspSI5nIOpMAPYneCWdH1twVZobT0VUMDmWtw/N/EykQOXD4Mqhl0kwg+US6vb+8 26 | pKEuPu7+iDA1e2oMN/Z6qrXw9QkOp6jnBhl0BcbpM0zRhWYpWyB6wsS2YK27dn29 27 | 93rM/opHs7AIyvdNAbyB3SE= 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /glyrics-ext/key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCgFNwC5tq+6WHa 3 | tgIIsrZ3vspy+Z7Zr/DoiA464cD4gta5qADN2Fn4dKGuz7XdwrigXWDuWpqssuKe 4 | ShsPX7XwMQTCl8H1yJt+VTRd13vVbnb4yDf/SkoVfVuKzzMwY/2EzSWBsWRONGZE 5 | JMaTDEFyJgdn43f1pUDdXKc/Duvr4V0wE62jZWzG09qWozwQx7qECsI2ORsFGo3B 6 | R0cvm6dCkVT9PAasyek6Z2N6KYMNhYvZIx7Vhy7+iZ4PxaEHmztxUN2AN7tJpYJs 7 | fLEOHhPVRyltXLn1Idd6iuDWWen5TKrUwV9BzmLOFRB1iyFYPMJYx3bOr/5uQe6r 8 | XyFkmO7lAgMBAAECggEAEeeDXAe5+5Raz31/6L0kT2xVdFqa+7oD9d4RyWAqlyD7 9 | JzS1MlC6b2GMG+M7chwvTjBjgQU9O4eedRnQwP1xefXhlGoo1XakfZLGEqDhRtPe 10 | FqE+Mh16/8BPlszp6sWkO1A+m6zdjSmrLn/2fcfnIf9C4Mm+Rwk+ogOU6SagGHel 11 | Aa6Muqjb88i4BGM3WOJNHN5xRiLAFbZf2vTNThbbGmZdQRe/FTG/cSvqj3B4ohTk 12 | Nap3kAkhpnJfQ81T/nT3OmK7YOKsx7PHu1nBVawfy1+FbkZ5qbS1GYfDiBh7FQR2 13 | GBhXwOZBgorVanMTxw54Hwn5q294mH9lFWyo2IT4mQKBgQDT8RhZ2a+vfEtvlqNV 14 | gko/Mgog16DNmIBfBI7yYojWq9e60zL/Aig38JmyD97o1gdst8tV4TbKKvJgBJuu 15 | V1vztgraUa7cygVp3laXlp1tidqBPbTtumt+lpLV/QifVnKYj7NZ52yjepH/+CDC 16 | NHB8M2D2k05VxjTKlGtokuN47wKBgQDBW+pFAeI2Y3IkjXj1teXWbwF2q8c74DAY 17 | enq26Lp7m35PywEhemf5aUIkaSNGPONBDs8dmEwk29UR0pCQjovG4Y16JkpdePhW 18 | DbZ0kjRAnFWl9UOil6tsKSj4V/R9XV36pBryzKfuqBaWxDnjSo5YiKdd4ulgSwL1 19 | HzQLVzLNawKBgQC2QfB04/Rm7nZYoawYDpEWw0tebs/Dvc825s6etgmCwggkixah 20 | oRNA99DUBT3l8Jg17+AWHDRnqoL/+zZ9uHZEoFm44OGE0N3S6vaAKW98ET4sQgpj 21 | HRrvo0DmcFCH5WlqtLjBKXiNJQyEmLZjC4Fn7S8HHCoTLP2c8AFlzlt7VQKBgC8q 22 | 79wDmJ4x5h86j55I0BdeHtpHDyPxDWp7PkIuRYdvqAFpAQ6coI57+dGOADfbFIjD 23 | RwzuIO0A31oopnFNBJXwYaXBf3SL1PCRCcgn/i0gtdf1G5mnK/8Hj2H9eru2Mf25 24 | WIWQHQsf39rJZWGnx0+bjlBd0RZXVhJbmUOG8vKfAoGAJQ10+vxp90hfdTGAr7Jy 25 | 4Mrj52PKEqEIWZv6RUSGZ5jbA9Xl/qpdmEFgXbXtl3Y9P2gfsS9KC5JiZ6TwrRSA 26 | wLFjMJ8C0txu8WBeCcPA8nwzMPXp83KXn9bHIwB1tc0rURO6w8CTH7a1bmUCr0mP 27 | aKliagp8Uw8FRcifqryYlqM= 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | # Javascript Node CircleCI 2.0 configuration file 2 | # 3 | # Check https://circleci.com/docs/2.0/language-javascript/ for more details 4 | # 5 | version: 2 6 | jobs: 7 | build: 8 | docker: 9 | # specify the version you desire here 10 | - image: circleci/node:7.10 11 | 12 | # Specify service dependencies here if necessary 13 | # CircleCI maintains a library of pre-built images 14 | # documented at https://circleci.com/docs/2.0/circleci-images/ 15 | # - image: circleci/mongo:3.4.4 16 | 17 | working_directory: ~/repo 18 | 19 | steps: 20 | - checkout 21 | 22 | # Download and cache dependencies 23 | - restore_cache: 24 | keys: 25 | - v1-dependencies-{{ checksum "package.json" }} 26 | # fallback to using the latest cache if no exact match is found 27 | - v1-dependencies- 28 | 29 | - run: npm install 30 | 31 | - save_cache: 32 | paths: 33 | - node_modules 34 | key: v1-dependencies-{{ checksum "package.json" }} 35 | # install chrome dependencies 36 | - run: sudo apt-get update && sudo apt-get install -yq --no-install-recommends libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 libnss3 37 | - run: sudo groupadd -r pptruser && sudo useradd -r -g pptruser -G audio,video pptruser && sudo mkdir -p /home/pptruser/Downloads && sudo chown -R pptruser:pptruser /home/pptruser 38 | - run: sudo su - pptruser 39 | # run tests! 40 | - run: npm test 41 | 42 | 43 | -------------------------------------------------------------------------------- /docs/_includes/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 43 | -------------------------------------------------------------------------------- /docs/privacy_policy.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Gaana Lyrics - Privacy Policy 4 | permalink: /privacy_policy/ 5 | --- 6 |
7 |
8 |
9 |

Privacy Policy

10 | 11 |

This privacy policy sets out how Gaana Lyrics Extension uses and protects any information that is collected.

12 | 13 |

Gaana Lyrics is committed to ensuring that your privacy is protected. Should we ask you to provide certain 14 | information by which you can be identified when using this website, then you can be assured that it will 15 | only be used in accordance with this privacy statement.

16 | 17 |

Gaana Lyrics may change this policy from time to time by updating this page. You should check this page 18 | from time to time to ensure that you are happy with any changes. This policy is effective from October 01, 2016.

19 | 20 |

Gaana Lyrics is aimed at people over 13

21 |

User Data

22 |

The extension does not collect any user identifiable data. It only collects the artist, 23 | album and other track information from the webpage in order to search for lyrics online.

24 | 25 |

Also, the music track related information is collected only for the music websites that 26 | the extension supports. For any other website you visit, it does not extract any information 27 | from the website.

28 | 29 |

Security and Retention

30 |

Gaana lyrics does not store any of the collected information anywhere. The artist/track information is 31 | directly sent to online lyrics gathering websites for searching the particular lyrics. 32 |

33 |
34 |
35 |
36 | 37 |
38 |
39 | 40 | 41 | 46 | 49 |
50 |
-------------------------------------------------------------------------------- /glyrics-ext/color-scheme.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | window.getSchemeColors = function(hue, bg){ 3 | var color={}; 4 | color.headerBackground='#'+hsbToHex({'h':hue, 's':100, 'x':80}); 5 | color.border='#'+hsbToHex({'h':hue, 's':100, 'x':80}); 6 | 7 | switch (bg){ 8 | case "white": 9 | color.bodyBackground="white"; 10 | color.scrollBarBackground="#eeeeee"; 11 | color.scrollBarThumb="#cfcfcf"; 12 | color.bodyText="black"; 13 | color.link='#'+hsbToHex({'h':hue, 's':100, 'x':30}); 14 | color.visitedLink='#'+hsbToHex({'h':hue, 's':100, 'x':30}); 15 | break; 16 | case "black": 17 | color.bodyBackground="#121314"; 18 | color.scrollBarBackground="#1c1c1f"; 19 | color.scrollBarThumb="#323438"; 20 | color.bodyText="white"; 21 | color.link='#'+hsbToHex({'h':hue, 's':100, 'x':80}); 22 | color.visitedLink='#'+hsbToHex({'h':hue, 's':100, 'x':80}); 23 | break; 24 | default: 25 | color.bodyBackground='#'+hsbToHex({'h':hue, 's':20, 'x':100}); 26 | color.scrollBarBackground='#'+hsbToHex({'h':hue, 's':5, 'x':100}); 27 | color.scrollBarThumb='#'+hsbToHex({'h':hue, 's':30, 'x':80}); 28 | color.bodyText="black"; 29 | color.link='#'+hsbToHex({'h':hue, 's':100, 'x':30}); 30 | color.visitedLink='#'+hsbToHex({'h':hue, 's':100, 'x':30}); 31 | break; 32 | } 33 | 34 | console.log(color); 35 | return color; 36 | } 37 | 38 | var hsbToRgb = function (hsb) { 39 | var rgb = {}; 40 | var h = hsb.h; 41 | var s = hsb.s*255/100; 42 | var v = hsb.x*255/100; 43 | if(s == 0) { 44 | rgb.r = rgb.g = rgb.b = v; 45 | } else { 46 | var t1 = v; 47 | var t2 = (255-s)*v/255; 48 | var t3 = (t1-t2)*(h%60)/60; 49 | if(h==360) h = 0; 50 | if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3} 51 | else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3} 52 | else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3} 53 | else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3} 54 | else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3} 55 | else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3} 56 | else {rgb.r=0; rgb.g=0; rgb.b=0} 57 | } 58 | return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)}; 59 | }; 60 | 61 | var rgbToHex = function (rgb) { 62 | var hex = [ 63 | rgb.r.toString(16), 64 | rgb.g.toString(16), 65 | rgb.b.toString(16) 66 | ]; 67 | $.each(hex, function (nr, val) { 68 | if (val.length == 1) { 69 | hex[nr] = '0' + val; 70 | } 71 | }); 72 | return hex.join(''); 73 | }; 74 | 75 | var hsbToHex = function (hsb) { 76 | return rgbToHex(hsbToRgb(hsb)); 77 | }; 78 | })(); 79 | -------------------------------------------------------------------------------- /docs/js/jquery.counterup.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jquery.counterup.js 1.0 3 | * 4 | * Copyright 2013, Benjamin Intal http://gambit.ph @bfintal 5 | * Released under the GPL v2 License 6 | * 7 | * Date: Nov 26, 2013 8 | */ 9 | (function( $ ){ 10 | "use strict"; 11 | 12 | $.fn.counterUp = function( options ) { 13 | 14 | // Defaults 15 | var settings = $.extend({ 16 | 'time': 400, 17 | 'delay': 10 18 | }, options); 19 | 20 | return this.each(function(){ 21 | 22 | // Store the object 23 | var $this = $(this); 24 | var $settings = settings; 25 | 26 | var counterUpper = function() { 27 | var nums = []; 28 | var divisions = $settings.time / $settings.delay; 29 | var num = $this.text(); 30 | var isComma = /[0-9]+,[0-9]+/.test(num); 31 | num = num.replace(/,/g, ''); 32 | var isInt = /^[0-9]+$/.test(num); 33 | var isFloat = /^[0-9]+\.[0-9]+$/.test(num); 34 | var decimalPlaces = isFloat ? (num.split('.')[1] || []).length : 0; 35 | 36 | // Generate list of incremental numbers to display 37 | for (var i = divisions; i >= 1; i--) { 38 | 39 | // Preserve as int if input was int 40 | var newNum = parseInt(num / divisions * i); 41 | 42 | // Preserve float if input was float 43 | if (isFloat) { 44 | newNum = parseFloat(num / divisions * i).toFixed(decimalPlaces); 45 | } 46 | 47 | // Preserve commas if input had commas 48 | if (isComma) { 49 | while (/(\d+)(\d{3})/.test(newNum.toString())) { 50 | newNum = newNum.toString().replace(/(\d+)(\d{3})/, '$1'+','+'$2'); 51 | } 52 | } 53 | 54 | nums.unshift(newNum); 55 | } 56 | 57 | $this.data('counterup-nums', nums); 58 | $this.text('0'); 59 | 60 | // Updates the number until we're done 61 | var f = function() { 62 | $this.text($this.data('counterup-nums').shift()); 63 | if ($this.data('counterup-nums').length) { 64 | setTimeout($this.data('counterup-func'), $settings.delay); 65 | } else { 66 | delete $this.data('counterup-nums'); 67 | $this.data('counterup-nums', null); 68 | $this.data('counterup-func', null); 69 | } 70 | }; 71 | $this.data('counterup-func', f); 72 | 73 | // Start the count up 74 | setTimeout($this.data('counterup-func'), $settings.delay); 75 | }; 76 | 77 | // Perform counts when the element gets into view 78 | $this.waypoint(counterUpper, { offset: '100%', triggerOnce: true }); 79 | }); 80 | 81 | }; 82 | 83 | })( jQuery ); -------------------------------------------------------------------------------- /glyrics-app/window.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0px; 3 | } 4 | 5 | #actionbar { 6 | margin: 0px; 7 | padding: 0px; 8 | width: 100%; 9 | height: 40px; 10 | background-color: #ffcd35; 11 | position: fixed; 12 | top: 0px; 13 | left: 0px; 14 | font-size: 16px; 15 | padding-left: 10px; 16 | } 17 | 18 | #header { 19 | display: block; 20 | height: 40px; 21 | line-height: 40px; /* center vertically */ 22 | width: calc(100% - 80px); 23 | white-space: nowrap; 24 | text-overflow: ellipsis; 25 | overflow-x: hidden; 26 | -webkit-user-select: text; 27 | cursor: text; 28 | } 29 | 30 | #content-viewport { 31 | background-color: #eeeeee; 32 | position: fixed; 33 | top: 40px; 34 | bottom: 0; 35 | left: 0; 36 | right: 0; 37 | overflow-y: auto; 38 | z-index: 1; 39 | } 40 | 41 | #content-viewport::-webkit-scrollbar { 42 | width: 8px; 43 | } 44 | 45 | #content-viewport::-webkit-scrollbar-thumb { 46 | border: 1px solid silver; 47 | border-radius: 8px; 48 | background-color: silver; 49 | } 50 | 51 | #content-viewport::-webkit-scrollbar-track { 52 | background-color: #eeeeee; 53 | } 54 | 55 | #content-viewport::-webkit-scrollbar-corner { 56 | background-color: white; 57 | } 58 | 59 | #content { 60 | position: static; 61 | margin: 8px 8px 8px 8px; 62 | padding: 8px 8px 8px 8px; 63 | background-color: #ffffff; 64 | box-shadow: 0px 1px 1px 0px #aaaaaa; 65 | -webkit-user-select: text; 66 | cursor: text; 67 | } 68 | 69 | 70 | 71 | article { 72 | height: 100%; 73 | overflow: auto; 74 | font-size: 14px; 75 | } 76 | 77 | hr { 78 | display: block; 79 | height: 1px; 80 | border: 0; 81 | border-top: 1px solid #ccc; 82 | margin: 1em 0; 83 | padding: 0; 84 | } 85 | 86 | p { 87 | margin: 0 0; 88 | } 89 | 90 | .float-right { 91 | float: right; 92 | } 93 | 94 | .display-none { 95 | display:none; 96 | } 97 | 98 | dropdown { 99 | text-align: right; 100 | display: block; 101 | margin: 0px 0px; 102 | position: fixed; 103 | top: 7px; 104 | right: 5px; 105 | z-index: 2; 106 | } 107 | 108 | dropdown ul { 109 | margin: 0px; 110 | box-shadow: 0px 1px 1px 0px #aaaaaa; 111 | } 112 | 113 | dropdown ul li { 114 | display: block; 115 | width: 150px; 116 | background: #F0ECE0; 117 | padding: 5px 5px; 118 | text-align: left; 119 | } 120 | 121 | dropdown ul li:hover { 122 | background: orange; 123 | cursor: pointer; 124 | } 125 | 126 | dropdown label { 127 | text-align: center; 128 | display: inline-block; 129 | width: 20px; 130 | height: 20px; 131 | background: transparent; 132 | padding: 3px 3px 3px 3px; 133 | position: relative; 134 | } 135 | 136 | dropdown label img{ 137 | vertical-align: middle; 138 | } 139 | 140 | dropdown label:hover{ 141 | background: threedlightshadow; 142 | color: white; 143 | cursor: pointer; 144 | } 145 | 146 | dropdown input { 147 | display: none; 148 | } 149 | 150 | dropdown input ~ ul { 151 | position: relative; 152 | visibility: hidden; 153 | opacity: 0; 154 | top: -20px; 155 | padding: 0px; 156 | display: none; 157 | } 158 | 159 | dropdown input:checked+label { 160 | background: threedlightshadow; 161 | color: white; 162 | } 163 | 164 | 165 | dropdown input:checked ~ ul { 166 | display: block; 167 | visibility: visible; 168 | opacity: 1; 169 | top: 0; 170 | } 171 | 172 | .animate { 173 | -webkit-transition: all .3s; 174 | -moz-transition: all .3s; 175 | -ms-transition: all .3s; 176 | -ms-transition: all .3s; 177 | transition: all .3s; 178 | backface-visibility: hidden; 179 | -webkit-backface-visibility: hidden; /* Chrome and Safari */ 180 | -moz-backface-visibility: hidden; /* Firefox */ 181 | -ms-backface-visibility: hidden; /* Internet Explorer */ 182 | } 183 | 184 | 185 | -------------------------------------------------------------------------------- /glyrics-ext/css/lyrics.css: -------------------------------------------------------------------------------- 1 | hr.glyrics { 2 | margin: 0 0; 3 | display: block; 4 | height: 1px; 5 | border: 0; 6 | border-top: 1px solid #A3BFBA; 7 | padding: 0; 8 | } 9 | 10 | .glyrics br { 11 | padding: 0; 12 | content: none; 13 | } 14 | 15 | 16 | #lyrics-container { 17 | font-size: 14px; 18 | position: fixed; 19 | top: 200px; 20 | left: 500px; 21 | padding: 0; 22 | border: solid 1px #F44336; 23 | opacity: 0.9; 24 | z-index: 2147483647; 25 | max-height: 100%; 26 | max-width: 100%; 27 | min-width: 200px; 28 | min-height: 50px; 29 | display: inline-block; 30 | font-weight: normal; 31 | box-shadow: rgba(0, 0, 0, 0.3) 5px 5px 5px -3px; 32 | color: black; 33 | background-color:white; 34 | text-align:left; 35 | } 36 | 37 | #lyrics-topbar { 38 | height: 30px; 39 | cursor: move; 40 | font-weight: bold; 41 | padding: 0; 42 | vertical-align: middle; 43 | margin: 0; 44 | color: white; 45 | background-color: #F44336; 46 | font-size:13px; 47 | } 48 | 49 | #lyrics-topbar #lyrics-header-tb { 50 | width: 100%; 51 | height: 100%; 52 | border-spacing: 0; 53 | vertical-align: middle; 54 | padding-right: 2px; 55 | } 56 | 57 | #lyrics-topbar #lyrics-header-tb #lyrics-header { 58 | white-space: nowrap; 59 | overflow-x: hidden; 60 | text-overflow: ellipsis; 61 | vertical-align: middle; 62 | padding-left: 5px; 63 | max-width: 100px; 64 | } 65 | 66 | #lyrics-topbar #lyrics-header-tb .glyrics-btn { 67 | width: 20px; 68 | min-width: 20px; 69 | max-width: 20px; 70 | text-align: right; 71 | vertical-align: middle; 72 | padding: 0; 73 | line-height: normal; 74 | height: auto; 75 | } 76 | 77 | #lyrics-topbar #lyrics-header-tb .glyrics-btn .glyrics-btn-img { 78 | vertical-align: middle; 79 | cursor: pointer; 80 | padding: 2px 2px 2px 2px; 81 | } 82 | 83 | #lyrics-topbar #lyrics-header-tb .glyrics-btn .glyrics-btn-img:hover { 84 | background-color: rgba(0, 0, 0, .2); 85 | } 86 | 87 | #glyrics-content { 88 | padding: 8px; 89 | overflow-y: auto; 90 | display: inline-block; 91 | position: absolute; 92 | top: 30px; 93 | left: 0; 94 | right: 0; 95 | bottom: 0; 96 | line-height: normal; 97 | } 98 | 99 | #glyrics-content *{ 100 | font-size: inherit; 101 | font-family: inherit; 102 | } 103 | 104 | #glyrics-content .courtesy{ 105 | font-size: 12px; 106 | } 107 | 108 | #glyrics-content,#glyrics-content * { 109 | color: black; 110 | } 111 | 112 | #glyrics-content a:LINK { 113 | color: #cc6d1d; 114 | } 115 | 116 | #glyrics-content a:VISITED { 117 | color: #cc6d1d; 118 | } 119 | 120 | #glyrics-content a:HOVER { 121 | text-decoration: underline; 122 | } 123 | 124 | #glyrics-content::-webkit-scrollbar { 125 | width: 10px; 126 | } 127 | 128 | #glyrics-content::-webkit-scrollbar-thumb { 129 | border: 1px solid #CFCFCF; 130 | border-radius: 10px; 131 | background-color: #CFCFCF; 132 | } 133 | 134 | #glyrics-content::-webkit-scrollbar-track { 135 | background-color: #EEEEEE; 136 | } 137 | 138 | #glyrics-content::-webkit-scrollbar-corner { 139 | background-color: #EEEEEE; 140 | } 141 | 142 | #glyrics-text{ 143 | padding-bottom:5px; 144 | } 145 | 146 | .DefaultFont { 147 | 148 | /*font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif;*/ 149 | font-size: 14px; 150 | } 151 | 152 | .BrushScriptMT { 153 | font-family: "Brush Script MT", cursive; 154 | font-size: 18px; 155 | } 156 | 157 | .Papyrus { 158 | font-family: Papyrus, fantasy; 159 | font-size: 16px; 160 | } 161 | 162 | .Helvetica { 163 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 164 | font-size: 14px; 165 | } 166 | 167 | 168 | .Baskerville { 169 | font-family: Baskerville, "Baskerville Old Face", "Hoefler Text", Garamond, "Times New Roman", serif; 170 | font-size: 16px; 171 | } 172 | 173 | .SegoeUI { 174 | font-family: "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif; 175 | font-size: 14px; 176 | } 177 | -------------------------------------------------------------------------------- /docs/css/syntax.css: -------------------------------------------------------------------------------- 1 | /* 2 | * syntax.css 3 | * GitHub syntax highlighting styles 4 | * obtained from https://github.com/mojombo/tpw/blob/master/css/syntax.css 5 | * 6 | */ 7 | 8 | .highlight { background: #ffffff; } 9 | .highlight .c { color: #999988; font-style: italic } /* Comment */ 10 | .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ 11 | .highlight .k { font-weight: bold } /* Keyword */ 12 | .highlight .o { font-weight: bold } /* Operator */ 13 | .highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */ 14 | .highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */ 15 | .highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */ 16 | .highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ 17 | .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ 18 | .highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */ 19 | .highlight .ge { font-style: italic } /* Generic.Emph */ 20 | .highlight .gr { color: #aa0000 } /* Generic.Error */ 21 | .highlight .gh { color: #999999 } /* Generic.Heading */ 22 | .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ 23 | .highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */ 24 | .highlight .go { color: #888888 } /* Generic.Output */ 25 | .highlight .gp { color: #555555 } /* Generic.Prompt */ 26 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 27 | .highlight .gu { color: #aaaaaa } /* Generic.Subheading */ 28 | .highlight .gt { color: #aa0000 } /* Generic.Traceback */ 29 | .highlight .kc { font-weight: bold } /* Keyword.Constant */ 30 | .highlight .kd { font-weight: bold } /* Keyword.Declaration */ 31 | .highlight .kp { font-weight: bold } /* Keyword.Pseudo */ 32 | .highlight .kr { font-weight: bold } /* Keyword.Reserved */ 33 | .highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */ 34 | .highlight .m { color: #009999 } /* Literal.Number */ 35 | .highlight .s { color: #d14 } /* Literal.String */ 36 | .highlight .na { color: #008080 } /* Name.Attribute */ 37 | .highlight .nb { color: #0086B3 } /* Name.Builtin */ 38 | .highlight .nc { color: #445588; font-weight: bold } /* Name.Class */ 39 | .highlight .no { color: #008080 } /* Name.Constant */ 40 | .highlight .ni { color: #800080 } /* Name.Entity */ 41 | .highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */ 42 | .highlight .nf { color: #990000; font-weight: bold } /* Name.Function */ 43 | .highlight .nn { color: #555555 } /* Name.Namespace */ 44 | .highlight .nt { color: #000080 } /* Name.Tag */ 45 | .highlight .nv { color: #008080 } /* Name.Variable */ 46 | .highlight .ow { font-weight: bold } /* Operator.Word */ 47 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 48 | .highlight .mf { color: #009999 } /* Literal.Number.Float */ 49 | .highlight .mh { color: #009999 } /* Literal.Number.Hex */ 50 | .highlight .mi { color: #009999 } /* Literal.Number.Integer */ 51 | .highlight .mo { color: #009999 } /* Literal.Number.Oct */ 52 | .highlight .sb { color: #d14 } /* Literal.String.Backtick */ 53 | .highlight .sc { color: #d14 } /* Literal.String.Char */ 54 | .highlight .sd { color: #d14 } /* Literal.String.Doc */ 55 | .highlight .s2 { color: #d14 } /* Literal.String.Double */ 56 | .highlight .se { color: #d14 } /* Literal.String.Escape */ 57 | .highlight .sh { color: #d14 } /* Literal.String.Heredoc */ 58 | .highlight .si { color: #d14 } /* Literal.String.Interpol */ 59 | .highlight .sx { color: #d14 } /* Literal.String.Other */ 60 | .highlight .sr { color: #009926 } /* Literal.String.Regex */ 61 | .highlight .s1 { color: #d14 } /* Literal.String.Single */ 62 | .highlight .ss { color: #990073 } /* Literal.String.Symbol */ 63 | .highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */ 64 | .highlight .vc { color: #008080 } /* Name.Variable.Class */ 65 | .highlight .vg { color: #008080 } /* Name.Variable.Global */ 66 | .highlight .vi { color: #008080 } /* Name.Variable.Instance */ 67 | .highlight .il { color: #009999 } /* Literal.Number.Integer.Long */ 68 | -------------------------------------------------------------------------------- /docs/js/google-map-init.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function() { 2 | "use strict"; 3 | 4 | 5 | function b() { 6 | var a = { 7 | zoom: 11, 8 | scrollwheel: false, 9 | center: new google.maps.LatLng(40.67, -73.94), 10 | styles: [{ 11 | "featureType": "landscape", 12 | "stylers": [ 13 | { 14 | "saturation": -100 15 | }, 16 | { 17 | "lightness": 65 18 | }, 19 | { 20 | "visibility": "on" 21 | } 22 | ] 23 | }, 24 | { 25 | "featureType": "poi", 26 | "stylers": [ 27 | { 28 | "saturation": -100 29 | }, 30 | { 31 | "lightness": 51 32 | }, 33 | { 34 | "visibility": "simplified" 35 | } 36 | ] 37 | }, 38 | { 39 | "featureType": "road.highway", 40 | "stylers": [ 41 | { 42 | "saturation": -100 43 | }, 44 | { 45 | "visibility": "simplified" 46 | } 47 | ] 48 | }, 49 | { 50 | "featureType": "road.arterial", 51 | "stylers": [ 52 | { 53 | "saturation": -100 54 | }, 55 | { 56 | "lightness": 30 57 | }, 58 | { 59 | "visibility": "on" 60 | } 61 | ] 62 | }, 63 | { 64 | "featureType": "road.local", 65 | "stylers": [ 66 | { 67 | "saturation": -100 68 | }, 69 | { 70 | "lightness": 40 71 | }, 72 | { 73 | "visibility": "on" 74 | } 75 | ] 76 | }, 77 | { 78 | "featureType": "transit", 79 | "stylers": [ 80 | { 81 | "saturation": -100 82 | }, 83 | { 84 | "visibility": "simplified" 85 | } 86 | ] 87 | }, 88 | { 89 | "featureType": "administrative.province", 90 | "stylers": [ 91 | { 92 | "visibility": "off" 93 | } 94 | ] 95 | }, 96 | { 97 | "featureType": "water", 98 | "elementType": "labels", 99 | "stylers": [ 100 | { 101 | "visibility": "on" 102 | }, 103 | { 104 | "lightness": -25 105 | }, 106 | { 107 | "saturation": -100 108 | } 109 | ] 110 | }, 111 | { 112 | "featureType": "water", 113 | "elementType": "geometry", 114 | "stylers": [ 115 | { 116 | "hue": "#ffff00" 117 | }, 118 | { 119 | "lightness": -25 120 | }, 121 | { 122 | "saturation": -97 123 | } 124 | ] 125 | }] 126 | }, 127 | b = document.getElementById("map"), 128 | c = new google.maps.Map(b, a); 129 | new google.maps.Marker({ 130 | position: new google.maps.LatLng(40.67, -73.94), 131 | map: c, 132 | title: "Snazzy!" 133 | }) 134 | } 135 | google.maps.event.addDomListener(window, "load", b); 136 | 137 | }); -------------------------------------------------------------------------------- /glyrics-app/window.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Gaana Lyrics 10 | 11 | 12 |
13 | 14 | Gaana Lyrics - Play a song! 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 |
    23 |
  • Keep window on top
  • 24 | 25 |
  • Reload lyrics
  • 26 | 27 |
28 |
29 | 30 |
31 |
32 |
33 |

34 | Note: The app requires the Gaana Lyrics extension to 35 | be installed to retrieve track information. If you do not have the 36 | extension installed please install it now.

39 |

40 | 41 |

To view lyrics play a song in any of the below music services 42 | in Chrome:

43 | 83 |
84 |
85 |
86 | 87 |
88 |

All form fields are required.

89 | 90 |
91 |
92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 |
102 |
103 |
104 | 105 | 106 | -------------------------------------------------------------------------------- /glyrics-ext/options/options.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Gaana Lyrics Options 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |

Gaana Lyrics Settings

13 |
14 |
15 |
16 |

Appearance

17 |
18 | 19 |
Hue: 20 |
21 |
22 |
Background: 23 | 24 | 25 | 26 |
27 |
28 | 29 |
30 |
31 |
32 |

Content

33 |
34 | 46 |
47 | 57 |
58 |
59 |
60 |

Gaana Lyrics App

61 |
62 | 63 | Open lyrics in App Window
64 | (For this option to work, you need the Gaana Lyrics App. 65 | Please install it from Chrome 66 | Web Store. DO NOT select this, if you do not have the App.)
67 |
68 |
69 | 70 |


71 |
72 | 73 |
74 |

Preview

75 |
76 |
Lyrics
77 |
78 | Lorem ipsum dolor sit amet
consectetur adipisicing elit
79 | sed do eiusmod tempor incididunt ut
labore et dolore magna 80 | aliqua 81 |
82 |
83 | Lorem ipsum dolor sit amet
consectetur adipisicing elit
84 | sed do eiusmod tempor incididunt ut
labore et dolore magna 85 | aliqua 86 |
87 |
88 | Lorem ipsum dolor sit amet
consectetur adipisicing elit
89 | sed do eiusmod tempor incididunt ut
labore et dolore magna 90 | aliqua 91 |
92 |
93 | Lorem ipsum dolor sit amet
consectetur adipisicing elit
94 | sed do eiusmod tempor incididunt ut
labore et dolore magna 95 | aliqua 96 |
97 |
98 |
99 | Lyrics provided by LyricWiki. 100 | 101 |
102 |
103 |
104 | 105 |
106 | 107 | 108 | 109 | 110 |
111 | 112 |
113 |
114 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /test/glyrics-ext/testTrackExtraction.js: -------------------------------------------------------------------------------- 1 | const puppeteer = require('puppeteer'); 2 | var expect = require('chai').expect; 3 | 4 | describe('track details extraction', function(){ 5 | describe('wynk',function(){ 6 | var trackTitle; 7 | var artist; 8 | var album; 9 | before(async function(){ 10 | this.timeout(20000); 11 | const browser = await puppeteer.launch({headless: false}); 12 | const page = await browser.newPage(); 13 | await page.goto('https://wynk.in/music/song/Girls-Like-You/um_00602567683223-USUM71805272?page=0', {waitUntil: "networkidle2"}); 14 | //Inject JQuery 15 | await page.addScriptTag({path:"glyrics-ext/jquery-3.3.1.min.js"}); 16 | //Inject js file 17 | await page.addScriptTag({path:"glyrics-ext/wynk/extract_track_info.js"}); 18 | await page.click('button[play-song]'); 19 | await sleep(2000); 20 | trackTitle = await page.evaluate('fetchTrackInfo();window.songName'); 21 | album = await page.evaluate('window.album'); 22 | artist = await page.evaluate('window.firstArtist'); 23 | await browser.close(); 24 | }); 25 | it('track', async function(){ 26 | expect(trackTitle).to.equal('Girls Like You'); 27 | }); 28 | 29 | it('artist', async function(){ 30 | expect(artist).to.equal('Maroon 5'); 31 | }); 32 | }); 33 | 34 | describe('soundcloud',function(){ 35 | var trackTitle; 36 | var artist; 37 | var album; 38 | before(async function(){ 39 | this.timeout(20000); 40 | const browser = await puppeteer.launch(); 41 | const page = await browser.newPage(); 42 | await page.goto('https://soundcloud.com/postmalone/candy-paint', {waitUntil: "networkidle2"}); 43 | //Inject JQuery 44 | await page.addScriptTag({path:"glyrics-ext/jquery-3.3.1.min.js"}); 45 | //Inject js file 46 | await page.addScriptTag({path:"glyrics-ext/soundcloud/extract_track_info.js"}); 47 | //await page.click('button[play-song]'); 48 | //await sleep(2000); 49 | trackTitle = await page.evaluate('fetchTrackInfo();window.songName'); 50 | album = await page.evaluate('window.album'); 51 | artist = await page.evaluate('window.firstArtist'); 52 | await browser.close(); 53 | }); 54 | it('track', async function(){ 55 | expect(trackTitle).to.equal('Candy Paint'); 56 | }); 57 | 58 | it('artist', async function(){ 59 | expect(artist).to.equal('Post Malone'); 60 | }); 61 | }); 62 | 63 | describe('gaana',function(){ 64 | var trackTitle; 65 | var artist; 66 | var album; 67 | before(async function(){ 68 | this.timeout(15000); 69 | const browser = await puppeteer.launch({headless: false}); 70 | const page = await browser.newPage(); 71 | await page.goto('https://gaana.com/song/heer-13', {waitUntil: "networkidle2"}); 72 | //Inject JQuery 73 | await page.addScriptTag({path:"glyrics-ext/jquery-3.3.1.min.js"}); 74 | //Inject js file 75 | await page.addScriptTag({path:"glyrics-ext/wynk/extract_track_info.js"}); 76 | //await page.click('button[play-song]'); 77 | await sleep(5000); 78 | await page.screenshot({path: 'gaana.png'}); 79 | trackTitle = await page.evaluate('fetchTrackInfo();window.songName'); 80 | album = await page.evaluate('window.album'); 81 | artist = await page.evaluate('window.firstArtist'); 82 | await browser.close(); 83 | }); 84 | it('track', async function(){ 85 | expect(trackTitle).to.equal('Heer'); 86 | }); 87 | 88 | it('artist', async function(){ 89 | expect(artist).to.equal('Harshdeep Kaur'); 90 | }); 91 | }); 92 | 93 | 94 | describe('accuradio',function(){ 95 | var trackTitle; 96 | var artist; 97 | var album; 98 | before(async function(){ 99 | this.timeout(20000); 100 | const browser = await puppeteer.launch({headless: false}); 101 | const page = await browser.newPage(); 102 | await page.goto('https://www.accuradio.com/featured/mostpopular/', {waitUntil: "networkidle2"}); 103 | console.log("Page loaded"); 104 | //Inject JQuery 105 | await page.addScriptTag({path:"glyrics-ext/jquery-3.3.1.min.js"}); 106 | //Inject js file 107 | await page.addScriptTag({path:"glyrics-ext/wynk/extract_track_info.js"}); 108 | await page.evaluate(()=>{ 109 | var first_channel=$('div.channel:first a'); 110 | first_channel.click(); 111 | }); 112 | //await page.click("div.channel:first a"); 113 | await sleep(5000); 114 | //await page.screenshot({path: 'gaana.png'}); 115 | trackTitle = await page.evaluate('fetchTrackInfo();window.songName'); 116 | album = await page.evaluate('window.album'); 117 | artist = await page.evaluate('window.firstArtist'); 118 | await browser.close(); 119 | }); 120 | it('track', async function(){ 121 | expect(trackTitle.length()).to.greaterThan(0) 122 | }); 123 | 124 | it('artist', async function(){ 125 | expect(artist.length()).to.greaterThan(0); 126 | }); 127 | }); 128 | }); 129 | 130 | function sleep(ms) { 131 | return new Promise(resolve => setTimeout(resolve, ms)); 132 | } 133 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Gaana Lyrics Extension 4 | permalink: / 5 | --- 6 | 7 | 8 |
9 |
10 |
11 |
12 |
13 |

GAANA LYRICS
BROWSER EXTENSION

14 |

Get your song lyrics right on the page for streaming music websites. We support most of the music services on the web.

15 |
16 |
17 |
18 |
19 |
20 | 21 | 22 |
23 |
24 |
25 |
26 |
27 |
28 |

Works With Everything

29 |

Most music services, from Gaana.com to Spotify, Google Music, Pandora, SoundCloud and many others are supported and regularly updated. Here is the complete list:

30 |

♪ Gaana.com ♪ Spotify Web Player ♪ Saavn ♪ SoundCloud ♪ Raaga ♪ Amazon Prime Music ♪ Google Music ♪ Earbits ♪ Pandora Radio ♪ Plex Web ♪ AccuRadio ♪ Slacker Radio ♪ Jango ♪ 8tracks ♪ Deezer ♪ Tidal ♪ Wynk ♪ Groove

31 |
32 |

Still, if you do not find your favorite music service supported, you can just drop us a mail or comment. It will be added as soon as possible.

33 |
34 |
35 |
36 |
37 | Img 38 |
39 |
40 |
41 |
42 |
43 | 44 |
45 |
46 |
47 |
48 |

FREE & OPEN SOURCE

49 |

The extension is absolutely free. Also, the source code is available on github

50 | View Source 51 |
52 |
53 |
54 |
55 | 56 | 57 | 58 |
59 |
60 |
61 |
62 |
63 |

Get Gaana Lyrics Extension

64 |

The extension is currently available for Google Chrome and Opera

65 | Download for Chrome 66 | Download for Opera 67 |
68 |
69 |
70 |
71 |
72 | 73 |
74 |
75 |
76 |
77 |

Fun Facts

78 |

The project started in 2014 for displaying lyrics on Gaana.com as there was not any extension back then for this music service. Later support was added for many other music sites.

79 |
80 |
81 |
82 |
83 |
84 |
    85 |
  • 86 |
    87 | 88 |

    4.4

    89 | Average Rating 90 |
    91 |
  • 92 |
  • 93 |
    94 | 95 |

    6000

    96 | Weekly Users 97 |
    98 |
  • 99 |
100 |
101 |
102 |
103 | 139 |
140 |
141 |
142 |
143 | -------------------------------------------------------------------------------- /glyrics-ext/options/options.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | @font-face { 3 | font-family: 'Calligraffitti'; 4 | src: url('chrome-extension://__MSG_@@extension_id__/fonts/Calligraffitti.ttf'); 5 | } 6 | 7 | @font-face { 8 | font-family: 'Courgette'; 9 | src: url('chrome-extension://__MSG_@@extension_id__/fonts/Courgette.ttf'); 10 | } 11 | 12 | @font-face { 13 | font-family: 'CraftyGirls'; 14 | src: url('chrome-extension://__MSG_@@extension_id__/fonts/CraftyGirls.ttf'); 15 | } 16 | 17 | @font-face { 18 | font-family: 'GloriaHallelujah'; 19 | src: url('chrome-extension://__MSG_@@extension_id__/fonts/GloriaHallelujah.ttf'); 20 | } 21 | 22 | @font-face { 23 | font-family: 'Inconsolata'; 24 | src: url('chrome-extension://__MSG_@@extension_id__/fonts/Inconsolata.ttf'); 25 | } 26 | 27 | @font-face { 28 | font-family: 'Slabo27px'; 29 | src: url('chrome-extension://__MSG_@@extension_id__/fonts/Slabo27px.ttf'); 30 | } 31 | 32 | @font-face { 33 | font-family: 'WalterTurncoat'; 34 | src: url('chrome-extension://__MSG_@@extension_id__/fonts/WalterTurncoat.ttf'); 35 | } 36 | 37 | body { 38 | font-family: Roboto, 'Segoe UI', Tahoma, sans-serif; 39 | color: rgb(48, 57, 66); 40 | margin: 0px; 41 | background-color: #f8f9fa; 42 | } 43 | 44 | hr { 45 | border-color:transparent; 46 | border-width:1px; 47 | border-top-color:rgb(250,250,250); 48 | } 49 | 50 | h1 { 51 | z-index: 1; 52 | position: fixed; 53 | width: 100%; 54 | background-color: #3367d6; 55 | color: white; 56 | margin: 0px; 57 | padding: 19px; 58 | font-size: 137%; 59 | font-weight: 400; 60 | letter-spacing: .25px; 61 | line-height: normal; 62 | } 63 | 64 | h3 { 65 | color: black; 66 | font-size: 1.2em; 67 | margin-bottom: 0.8em; 68 | } 69 | 70 | input[type="radio"]{ 71 | margin-top:-2px; 72 | vertical-align: middle; 73 | } 74 | 75 | .warning { 76 | color: orangered; 77 | } 78 | 79 | #color-slider{ 80 | width:300px; 81 | margin-left:20px; 82 | } 83 | 84 | #color-slider.ui-slider{ 85 | height: 20px; 86 | background: -webkit-linear-gradient(left, #ff0000 0%,#ffff00 16.66666666666667%,#00ff00 33.33%,#00fffe 50%,#0000ff 66.66666666666667%,#fe00ff 83.33333333333333%,#ff0000 100%); 87 | /*background: linear-gradient(to right,#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000); 88 | */ 89 | } 90 | #color-slider .ui-slider-handle{ 91 | height: 20px; 92 | display:block; 93 | position: relative; 94 | width:5px; 95 | box-shadow: rgba(0, 0, 0, 0.3) 0px 0px 2px 1px; 96 | } 97 | 98 | label { 99 | display: -webkit-inline-box; 100 | } 101 | 102 | .option{ 103 | padding-bottom: 10px; 104 | padding-top: 10px; 105 | 106 | } 107 | 108 | .option2 { 109 | display: -webkit-inline-box; 110 | padding-bottom: 5px; 111 | margin-left: 25px; 112 | } 113 | span.caption { 114 | font-weight:bold; 115 | } 116 | 117 | #content { 118 | display:block; 119 | align-content: center; 120 | margin: 0 auto; 121 | width: 600px; 122 | padding-right: 50px; 123 | padding-left: 50px; 124 | padding-top: 60px; 125 | } 126 | 127 | #optionsContainer { 128 | display: inline-block; 129 | } 130 | 131 | .option-label { 132 | font-weight: normal; 133 | } 134 | 135 | section { 136 | margin-top: 10px; 137 | margin-left: 0px; 138 | padding-bottom: 10px; 139 | display: inline-block; 140 | } 141 | 142 | .settings-box { 143 | background-color: white; 144 | width: 385px; 145 | padding: 10px; 146 | box-shadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.2), 1px 0px 7px 0px rgba(0, 0, 0, 0.19); 147 | } 148 | 149 | #buttons{ 150 | padding-bottom: 20px; 151 | padding-right: 50px; 152 | } 153 | 154 | #save, #close { 155 | width: 60px; 156 | height: 22px; 157 | } 158 | 159 | #reset { 160 | float: right; 161 | height: 22px; 162 | } 163 | 164 | #previewPane { 165 | margin-left: 50px; 166 | vertical-align: top; 167 | } 168 | 169 | .colorbox { 170 | width: 60px; 171 | height: 10px; 172 | padding: 5px 5px 5px 5px; 173 | border: 1px solid black; 174 | display: inline-block; 175 | margin: 2px 2px 2px 2px; 176 | cursor: pointer; 177 | } 178 | 179 | .green { 180 | background-color: green; 181 | } 182 | 183 | .orange { 184 | background-color: orange; 185 | } 186 | 187 | .black { 188 | background-color: black; 189 | } 190 | 191 | #fontList{ 192 | width: 300px; 193 | } 194 | 195 | .font-item { 196 | padding: 5px 5px 5px 5px; 197 | border: 1px solid black; 198 | display: inline-block; 199 | margin: 2px 2px 2px 2px; 200 | cursor: pointer; 201 | height: 20px; 202 | vertical-align: text-top; 203 | } 204 | 205 | .DefaultFont{ 206 | font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; 207 | } 208 | 209 | .CraftyGirls { 210 | font-family: 'CraftyGirls'; 211 | } 212 | 213 | .Calligraffitti { 214 | font-family: 'Calligraffitti'; 215 | } 216 | 217 | .WalterTurncoat { 218 | font-family: 'WalterTurncoat'; 219 | } 220 | 221 | .GloriaHallelujah { 222 | font-family: 'GloriaHallelujah'; 223 | } 224 | 225 | .Inconsolata { 226 | font-family: 'Inconsolata'; 227 | } 228 | 229 | .Courgette { 230 | font-family: 'Courgette'; 231 | } 232 | 233 | .Slabo27px { 234 | font-family: 'Slabo27px'; 235 | } 236 | 237 | .selected { 238 | /*border: 3px dotted gray;*/ 239 | background-color: #FFCC66; 240 | } 241 | 242 | #lyrics-container { 243 | border: solid 2px; 244 | background-color: white; 245 | border-color: #F44336; 246 | opacity:0.9; 247 | height: 300px; 248 | position:relative; 249 | 250 | } 251 | 252 | #lyrics-topbar { 253 | padding: 6px 5px 4px 5px; 254 | background-color: #F44336; 255 | color: white; 256 | height: 20px; 257 | font-weight:bold; 258 | font-size:13px; 259 | vertical-align: middle; 260 | } 261 | 262 | 263 | #glyrics-content { 264 | padding: 8px; 265 | color:black; 266 | display:inline-block; 267 | overflow-y:auto; 268 | position:absolute; 269 | top: 30px; 270 | left: 0; 271 | right: 0; 272 | bottom: 0; 273 | } 274 | #glyrics-content,#glyrics-content * { 275 | color: black; 276 | } 277 | 278 | #glyrics-content a:LINK { 279 | color: #cc6d1d; 280 | } 281 | 282 | #glyrics-content a:VISITED { 283 | color: #cc6d1d; 284 | } 285 | 286 | #glyrics-content a:HOVER { 287 | text-decoration: underline; 288 | } 289 | 290 | #glyrics-content::-webkit-scrollbar { 291 | width: 10px; 292 | } 293 | 294 | #glyrics-content::-webkit-scrollbar-thumb { 295 | border: 1px solid #CFCFCF; 296 | border-radius: 10px; 297 | background-color: #CFCFCF; 298 | } 299 | 300 | #glyrics-content::-webkit-scrollbar-track { 301 | background-color: #EEEEEE; 302 | } 303 | 304 | #glyrics-content::-webkit-scrollbar-corner { 305 | background-color: #EEEEEE; 306 | } 307 | #glyrics-content .courtesy{ 308 | font-size: 10px; 309 | } 310 | #status { 311 | position: fixed; 312 | top:0px; 313 | left: 50%; 314 | margin-left: -90px; 315 | background-color:#FFCC66; 316 | color:black; 317 | border: solid 1px #FFCC33; 318 | padding: 2px 5px 2px 5px; 319 | display: none; 320 | border-radius: 5px; 321 | } 322 | -------------------------------------------------------------------------------- /docs/js/min/waypoints.min.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.6.2 2 | /* 3 | jQuery Waypoints - v2.0.3 4 | Copyright (c) 2011-2013 Caleb Troughton 5 | Dual licensed under the MIT license and GPL license. 6 | https://github.com/imakewebthings/jquery-waypoints/blob/master/licenses.txt 7 | */ 8 | (function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;e=0;s={horizontal:{},vertical:{}};f=1;a={};u="waypoints-context-id";p="resize.waypoints";y="scroll.waypoints";v=1;w="waypoints-waypoint-ids";g="waypoint";m="waypoints";o=function(){function t(t){var e=this;this.$element=t;this.element=t[0];this.didResize=false;this.didScroll=false;this.id="context"+f++;this.oldScroll={x:t.scrollLeft(),y:t.scrollTop()};this.waypoints={horizontal:{},vertical:{}};t.data(u,this.id);a[this.id]=this;t.bind(y,function(){var t;if(!(e.didScroll||c)){e.didScroll=true;t=function(){e.doScroll();return e.didScroll=false};return r.setTimeout(t,n[m].settings.scrollThrottle)}});t.bind(p,function(){var t;if(!e.didResize){e.didResize=true;t=function(){n[m]("refresh");return e.didResize=false};return r.setTimeout(t,n[m].settings.resizeThrottle)}})}t.prototype.doScroll=function(){var t,e=this;t={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(c&&(!t.vertical.oldScroll||!t.vertical.newScroll)){n[m]("refresh")}n.each(t,function(t,r){var i,o,l;l=[];o=r.newScroll>r.oldScroll;i=o?r.forward:r.backward;n.each(e.waypoints[t],function(t,e){var n,i;if(r.oldScroll<(n=e.offset)&&n<=r.newScroll){return l.push(e)}else if(r.newScroll<(i=e.offset)&&i<=r.oldScroll){return l.push(e)}});l.sort(function(t,e){return t.offset-e.offset});if(!o){l.reverse()}return n.each(l,function(t,e){if(e.options.continuous||t===l.length-1){return e.trigger([i])}})});return this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}};t.prototype.refresh=function(){var t,e,r,i=this;r=n.isWindow(this.element);e=this.$element.offset();this.doScroll();t={horizontal:{contextOffset:r?0:e.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:e.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[m]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(t,function(t,e){return n.each(i.waypoints[t],function(t,r){var i,o,l,s,f;i=r.options.offset;l=r.offset;o=n.isWindow(r.element)?0:r.$element.offset()[e.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(e.contextDimension*i/100)}}r.offset=o-e.contextOffset+e.contextScroll-i;if(r.options.onlyOnScroll&&l!=null||!r.enabled){return}if(l!==null&&l<(s=e.oldScroll)&&s<=r.offset){return r.trigger([e.backward])}else if(l!==null&&l>(f=e.oldScroll)&&f>=r.offset){return r.trigger([e.forward])}else if(l===null&&e.oldScroll>=r.offset){return r.trigger([e.forward])}})})};t.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([p,y].join(" "));return delete a[this.id]}};return t}();l=function(){function t(t,e,r){var i,o;r=n.extend({},n.fn[g].defaults,r);if(r.offset==="bottom-in-view"){r.offset=function(){var t;t=n[m]("viewportHeight");if(!n.isWindow(e.element)){t=e.$element.height()}return t-n(this).outerHeight()}}this.$element=t;this.element=t[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=e;this.enabled=r.enabled;this.id="waypoints"+v++;this.offset=null;this.options=r;e.waypoints[this.axis][this.id]=this;s[this.axis][this.id]=this;i=(o=t.data(w))!=null?o:[];i.push(this.id);t.data(w,i)}t.prototype.trigger=function(t){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,t)}if(this.options.triggerOnce){return this.destroy()}};t.prototype.disable=function(){return this.enabled=false};t.prototype.enable=function(){this.context.refresh();return this.enabled=true};t.prototype.destroy=function(){delete s[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};t.getWaypointsByElement=function(t){var e,r;r=n(t).data(w);if(!r){return[]}e=n.extend({},s.horizontal,s.vertical);return n.map(r,function(t){return e[t]})};return t}();d={init:function(t,e){var r;if(e==null){e={}}if((r=e.handler)==null){e.handler=t}this.each(function(){var t,r,i,s;t=n(this);i=(s=e.context)!=null?s:n.fn[g].defaults.context;if(!n.isWindow(i)){i=t.closest(i)}i=n(i);r=a[i.data(u)];if(!r){r=new o(i)}return new l(t,r,e)});n[m]("refresh");return this},disable:function(){return d._invoke(this,"disable")},enable:function(){return d._invoke(this,"enable")},destroy:function(){return d._invoke(this,"destroy")},prev:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e>0){return t.push(n[e-1])}})},next:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(et.oldScroll.y})},left:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset<=t.oldScroll.x})},right:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset>t.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(t,e){return d[t]=e},_invoke:function(t){var e;e=n.extend({},s.vertical,s.horizontal);return n.each(e,function(e,n){n[t]();return true})},_filter:function(t,e,r){var i,o;i=a[n(t).data(u)];if(!i){return[]}o=[];n.each(i.waypoints[e],function(t,e){if(r(i,e)){return o.push(e)}});o.sort(function(t,e){return t.offset-e.offset});return n.map(o,function(t){return t.element})}};n[m]=function(){var t,n;n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(h[n]){return h[n].apply(null,t)}else{return h.aggregate.call(null,n)}};n[m].settings={resizeThrottle:100,scrollThrottle:30};return i.load(function(){return n[m]("refresh")})})}).call(this); -------------------------------------------------------------------------------- /docs/work.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Our Work 4 | permalink: /work/ 5 | --- 6 | 7 | 8 | 20 | 21 |
22 | 117 |
118 | 119 | 120 |
121 |
122 |
123 |
124 |
125 | 163 |
164 |
165 |
166 |
167 |
168 | 169 | 170 | 171 |
172 |
173 |
174 |
175 |
176 |

We design delightful digital experiences.

177 |

Read more about what we do and our philosophy of design. Judge for yourself The work and results we’ve achieved for other clients, and meet our highly experienced Team who just love to design.

178 | Tell Us Your Story 179 |
180 |
181 |
182 |
183 |
184 | -------------------------------------------------------------------------------- /glyrics-ext/options/options.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | var glyrics_appid = "paiehomgejkdifojcddmbinmophkibac"; 3 | var settings = {}; 4 | var appWindowChecked; 5 | 6 | var colorSlider = $("#color-slider").slider({ 7 | min: 0, 8 | max: 360, 9 | step: 1, 10 | animate:true, 11 | slide: function (ev, ui) { 12 | setColorSettings(ui.value); 13 | previewAppearance(); 14 | } 15 | }); 16 | 17 | // Saves options to localStorage. 18 | function save_options() { 19 | chrome.storage.sync.set({'settings': settings}, function () { 20 | var status = document.getElementById("status"); 21 | status.innerHTML = "Your settings have been saved"; 22 | status.style.display = 'block'; 23 | setTimeout(function () { 24 | status.innerHTML = ""; 25 | status.style.display = 'none'; 26 | }, 3000); 27 | }); 28 | 29 | localStorage["appWindow"] = $("#appCheckBox").prop("checked"); 30 | 31 | 32 | } 33 | 34 | var setDefaultSettings = function(){ 35 | /* Setup Default Settings */ 36 | settings.hue = 50; 37 | settings.autoColorScheme = true; 38 | settings.background = "white"; 39 | settings.color = getSchemeColors(50, "white"); 40 | settings.defaultFontSize = '14px'; 41 | settings.fontClass = "DefaultFont"; 42 | settings.fontFamily = "'Trebuchet MS', Arial, Helvetica, sans-serif"; 43 | appWindowChecked=false; 44 | }; 45 | 46 | var setAllUISettings=function(){ 47 | /* Set UI settings */ 48 | if (settings.autoColorScheme === true) { 49 | $("input[name='theme'][value='auto']:radio").prop("checked", true); 50 | $("#color-slider").slider("disable"); 51 | $("input[name='background']").prop("disabled", true); 52 | } else { 53 | $("input[name='theme'][value='user']:radio").prop("checked", true); 54 | } 55 | $("input[name='background'][value='" + settings.background + "']:radio").prop("checked", true); 56 | 57 | colorSlider.slider("option", "value", 360 - settings.hue); 58 | $('#fontSize').val(settings.defaultFontSize); 59 | /* select font */ 60 | $('#fontList .selected').removeClass('selected'); 61 | $("div[fontClass='" + settings.fontClass + "']").addClass('selected'); 62 | 63 | if(appWindowChecked !== undefined) { 64 | $('#appCheckBox').prop('checked', appWindowChecked); 65 | } 66 | previewContent(); 67 | previewAppearance(); 68 | }; 69 | 70 | // Restores select box state to saved value from localStorage. 71 | function restore_options() { 72 | /* everything is stored as string in localStorage */ 73 | appWindowChecked = localStorage["appWindow"]=='true'; 74 | 75 | chrome.storage.sync.get("settings", function (object) { 76 | if (object.settings) { 77 | settings = object.settings; 78 | } 79 | else { 80 | setDefaultSettings(); 81 | } 82 | setAllUISettings(); 83 | }); 84 | 85 | checkAppInstalled(); 86 | } 87 | 88 | /* Event Listeners */ 89 | $(document).on('DOMContentLoaded', restore_options); 90 | 91 | $('#save').click(save_options); 92 | 93 | $("input[name='theme']:radio").change(function () { 94 | switch ($("input[name='theme']:checked").val()) { 95 | case "auto": 96 | colorSlider.slider("disable"); 97 | $("input[name='background']").prop("disabled", true); 98 | settings.autoColorScheme = true; 99 | break; 100 | case "user": 101 | colorSlider.slider("enable"); 102 | $("input[name='background']").prop("disabled", false); 103 | settings.autoColorScheme = false; 104 | break; 105 | } 106 | }); 107 | 108 | $("input[name='background']:radio").change(function () { 109 | settings.background = $("input[name='background']:checked").val(); 110 | switch (settings.background) { 111 | case "tinted": 112 | settings.color = getSchemeColors(settings.hue, "tinted"); 113 | break; 114 | case "white": 115 | settings.color = getSchemeColors(settings.hue, "white"); 116 | break; 117 | case "black": 118 | settings.color = getSchemeColors(settings.hue, "black"); 119 | break; 120 | } 121 | previewAppearance(); 122 | }); 123 | 124 | $('#fontSize').change(function () { 125 | settings.defaultFontSize = $(this).val(); 126 | previewContent(); 127 | }); 128 | 129 | $('#close').click(function () { 130 | window.close(); 131 | }); 132 | 133 | $('#reset').click(function () { 134 | setDefaultSettings(); 135 | setAllUISettings(); 136 | }); 137 | 138 | $('#fontList div').click( 139 | function () { 140 | $('#fontList .selected').removeClass('selected'); 141 | $(this).addClass('selected'); 142 | settings.fontClass = $(this).attr('fontClass'); 143 | settings.fontFamily = $(this).css('font-family'); 144 | previewContent(); 145 | }); 146 | 147 | function checkAppInstalled() { 148 | chrome.runtime.sendMessage( 149 | glyrics_appid, {msgType: "Version"}, 150 | function (response) { 151 | if (response) 152 | if (response.version > 1) { 153 | document.getElementById("appNotInstalledWarning").style.display = "none"; 154 | } 155 | }); 156 | } 157 | 158 | var previewAppearance = function () { 159 | $('#lyrics-container').css({ 160 | 'background-color': settings.color.bodyBackground, 161 | 'border-color': settings.color.border 162 | }); 163 | $('#lyrics-topbar').css('background-color', settings.color.headerBackground); 164 | $('#glyrics-content, #glyrics-content *').css('color', settings.color.bodyText); 165 | $('#glyrics-content a:LINK').css('color', settings.color.link); 166 | $('#glyrics-content a:VISITED').css('color', settings.color.visitedLink); 167 | for (var i = 0; i < document.styleSheets.length; i++) { 168 | var sheet = document.styleSheets[i]; 169 | if (sheet.title == 'option') { 170 | for (var j = 0; j < sheet.rules.length; j++) { 171 | var rule = sheet.rules[j]; 172 | if (rule.cssText.match("#glyrics-content::-webkit-scrollbar-track")) { 173 | rule.style.backgroundColor = settings.color.scrollBarBackground; 174 | } else if (rule.cssText.match("#glyrics-content::-webkit-scrollbar-thumb")) { 175 | rule.style.backgroundColor = settings.color.scrollBarThumb; 176 | rule.style.borderColor = settings.color.scrollBarThumb; 177 | } 178 | } 179 | } 180 | } 181 | }; 182 | 183 | var previewContent = function () { 184 | $('#glyrics-content').css({ 185 | 'font-size': settings.defaultFontSize, 186 | 'font-family': settings.fontFamily 187 | }); 188 | }; 189 | 190 | var setColorSettings = function (hue) { 191 | settings.hue = hue; 192 | colors = getSchemeColors(hue, settings.background); 193 | settings.color = colors; 194 | }; 195 | })(); 196 | -------------------------------------------------------------------------------- /glyrics-ext/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjncGVrX6BqXMlSfwMVrWP5qDTpD6dbuLJUGW1uBIm4Stjmawgy9lecB4nScuX6hORpj2kAYMNhvv4vrVc2T57RTcHeJVg04iEtfB4cTganIiOFykAlkZaSFJAtiP6kv2eqLSJDDuqEh/PHS7EqKpvJagDa/YodgRsVUdqwraT4O7QGCImJopD1ocNGALY11eLPcTkujYoMJyke/N12S0/hAryNPv6Zvnuerajqz+mjnAu2f1n5yQuRrirgO5GxHhcrdjFnMayTTybikRixD+xO07zVsl/+6FN2pfmc45QEf14IBPS+2r/wTvH6khiPGz2mofp7FEl/DXBfLjP8k5qwIDAQAB", 4 | "name": "Gaana Lyrics Extension", 5 | "short_name": "GLyrics Extension", 6 | "description": "Displays lyrics on Gaana.com, Google Music, YouTube Music, Spotify, Pandora, Saavn, SoundCloud and other streaming music services", 7 | "version": "4.2.2", 8 | "author": "Samik", 9 | "icons": { 10 | "16": "images/icon16.png", 11 | "64": "images/icon64.png", 12 | "128": "images/icon128.png" 13 | }, 14 | "options_page": "options/options.html", 15 | "background": { 16 | "scripts": [ 17 | "jquery-3.3.1.min.js", 18 | "background.js" 19 | ], 20 | "persistent": false 21 | }, 22 | "page_action": { 23 | "default_icon": { 24 | "19": "images/icon19.png", 25 | "38": "images/icon38.png" 26 | }, 27 | "default_title": "Show lyrics" 28 | }, 29 | "permissions": [ 30 | "*://lyrics.fandom.com/*", 31 | "*://lyrics.wikia.com/*", 32 | "activeTab", 33 | "contextMenus", 34 | "storage", 35 | "declarativeContent" 36 | ], 37 | "commands": { 38 | "_execute_browser_action": { 39 | "suggested_key": { 40 | "windows": "Ctrl+Shift+L", 41 | "mac": "Command+Shift+L", 42 | "chromeos": "Ctrl+Shift+L", 43 | "linux": "Ctrl+Shift+L" 44 | } 45 | } 46 | }, 47 | "content_scripts": [ 48 | { 49 | "matches": [ "*://gaana.com/*" ], 50 | "css": [ 51 | "css/lyrics.css", 52 | "css/jquery-ui.min.css" 53 | ], 54 | "js": [ 55 | "jquery-3.3.1.min.js", 56 | "jquery-ui.min.js", 57 | "script.js", 58 | "gaana/extract_track_info.js" 59 | ], 60 | "run_at": "document_end" 61 | }, 62 | { 63 | "matches": [ "*://www.accuradio.com/*" ], 64 | "js": [ 65 | "jquery-3.3.1.min.js", 66 | "jquery-ui.min.js", 67 | "script.js", 68 | "AccuRadio/extract_track_info.js" 69 | ], 70 | "run_at": "document_end", 71 | "css": [ 72 | "css/lyrics.css", 73 | "css/jquery-ui.min.css" 74 | ] 75 | }, 76 | { 77 | "matches": ["*://www.saavn.com/*"], 78 | "js": [ 79 | "jquery-3.3.1.min.js", 80 | "jquery-ui.min.js", 81 | "script.js", 82 | "saavn/extract_track_info.js" 83 | ], 84 | "run_at": "document_end", 85 | "css": [ 86 | "css/lyrics.css", 87 | "css/jquery-ui.min.css" 88 | ] 89 | }, 90 | { 91 | "matches": ["https://open.spotify.com/*","https://player.spotify.com/*", "https://play.spotify.com/*"], 92 | "js": [ 93 | "jquery-3.3.1.min.js", 94 | "jquery-ui.min.js", 95 | "script.js", 96 | "spotify/extract_track_info.js" 97 | ], 98 | "run_at": "document_end", 99 | "css": [ 100 | "css/lyrics.css", 101 | "css/jquery-ui.min.css" 102 | ] 103 | }, 104 | { 105 | "matches": ["*://play.raaga.com/*"], 106 | "js": [ 107 | "jquery-3.3.1.min.js", 108 | "jquery-ui.min.js", 109 | "script.js", 110 | "raaga/extract_track_info.js" 111 | ], 112 | "run_at": "document_end", 113 | "css": [ 114 | "css/lyrics.css", 115 | "css/jquery-ui.min.css" 116 | ] 117 | }, 118 | { 119 | "matches": ["*://soundcloud.com/*"], 120 | "js": [ 121 | "jquery-3.3.1.min.js", 122 | "jquery-ui.min.js", 123 | "script.js", 124 | "soundcloud/extract_track_info.js" 125 | ], 126 | "run_at": "document_end", 127 | "css": [ 128 | "css/lyrics.css", 129 | "css/jquery-ui.min.css" 130 | ] 131 | }, 132 | { 133 | "matches": ["*://music.amazon.com/*"], 134 | "js": [ 135 | "jquery-3.3.1.min.js", 136 | "jquery-ui.min.js", 137 | "script.js", 138 | "amazonmusic/extract_track_info.js" 139 | ], 140 | "run_at": "document_end", 141 | "css": [ 142 | "css/lyrics.css", 143 | "css/jquery-ui.min.css" 144 | ] 145 | }, 146 | { 147 | "matches": ["*://play.google.com/music/*"], 148 | "js": [ 149 | "jquery-3.3.1.min.js", 150 | "jquery-ui.min.js", 151 | "script.js", 152 | "googlemusic/extract_track_info.js" 153 | ], 154 | "run_at": "document_end", 155 | "css": [ 156 | "css/lyrics.css", 157 | "css/jquery-ui.min.css" 158 | ] 159 | }, 160 | { 161 | "matches": ["*://www.earbits.com/*", "*://earbits.com/*"], 162 | "js": [ 163 | "jquery-3.3.1.min.js", 164 | "jquery-ui.min.js", 165 | "script.js", 166 | "earbits/extract_track_info.js" 167 | ], 168 | "run_at": "document_end", 169 | "css": [ 170 | "css/lyrics.css", 171 | "css/jquery-ui.min.css" 172 | ] 173 | }, 174 | { 175 | "matches": ["*://www.pandora.com/*"], 176 | "js": [ 177 | "jquery-3.3.1.min.js", 178 | "jquery-ui.min.js", 179 | "script.js", 180 | "pandora/extract_track_info.js" 181 | ], 182 | "run_at": "document_end", 183 | "css": [ 184 | "css/lyrics.css", 185 | "css/jquery-ui.min.css" 186 | ] 187 | }, 188 | { 189 | "matches": [ 190 | "https://app.plex.tv/*", 191 | "http://127.0.0.1:32400/*", 192 | "http://localhost:32400/*" 193 | ], 194 | "js": [ 195 | "jquery-3.3.1.min.js", 196 | "jquery-ui.min.js", 197 | "script.js", 198 | "plex/extract_track_info.js" 199 | ], 200 | "run_at": "document_end", 201 | "css": [ 202 | "css/lyrics.css", 203 | "css/jquery-ui.min.css" 204 | ] 205 | }, 206 | { 207 | "matches": [ "*://www.slacker.com/*" ], 208 | "js": [ 209 | "jquery-3.3.1.min.js", 210 | "jquery-ui.min.js", 211 | "script.js", 212 | "slacker/extract_track_info.js" 213 | ], 214 | "run_at": "document_end", 215 | "css": [ 216 | "css/lyrics.css", 217 | "css/jquery-ui.min.css" 218 | ] 219 | }, 220 | { 221 | "matches": [ "*://www.jango.com/*" ], 222 | "js": [ 223 | "jquery-3.3.1.min.js", 224 | "jquery-ui.min.js", 225 | "script.js", 226 | "jango/extract_track_info.js" 227 | ], 228 | "run_at": "document_end", 229 | "css": [ 230 | "css/lyrics.css", 231 | "css/jquery-ui.min.css" 232 | ] 233 | }, 234 | { 235 | "matches": [ "*://www.deezer.com/*" ], 236 | "js": [ 237 | "jquery-3.3.1.min.js", 238 | "jquery-ui.min.js", 239 | "script.js", 240 | "deezer/extract_track_info.js" 241 | ], 242 | "run_at": "document_end", 243 | "css": [ 244 | "css/lyrics.css", 245 | "css/jquery-ui.min.css" 246 | ] 247 | }, 248 | { 249 | "matches": [ "*://8tracks.com/*" ], 250 | "js": [ 251 | "jquery-3.3.1.min.js", 252 | "jquery-ui.min.js", 253 | "script.js", 254 | "8tracks/extract_track_info.js" 255 | ], 256 | "run_at": "document_end", 257 | "css": [ 258 | "css/lyrics.css", 259 | "css/jquery-ui.min.css" 260 | ] 261 | }, 262 | { 263 | "matches": [ "*://listen.tidal.com/*" ], 264 | "js": [ 265 | "jquery-3.3.1.min.js", 266 | "jquery-ui.min.js", 267 | "script.js", 268 | "tidal/extract_track_info.js" 269 | ], 270 | "run_at": "document_end", 271 | "css": [ 272 | "css/lyrics.css", 273 | "css/jquery-ui.min.css" 274 | ] 275 | }, 276 | { 277 | "matches": [ "*://wynk.in/music/*" ], 278 | "js": [ 279 | "jquery-3.3.1.min.js", 280 | "jquery-ui.min.js", 281 | "script.js", 282 | "wynk/extract_track_info.js" 283 | ], 284 | "run_at": "document_end", 285 | "css": [ 286 | "css/lyrics.css", 287 | "css/jquery-ui.min.css" 288 | ] 289 | }, 290 | { 291 | "matches": [ "*://music.microsoft.com/*" ], 292 | "js": [ 293 | "jquery-3.3.1.min.js", 294 | "jquery-ui.min.js", 295 | "script.js", 296 | "groove/extract_track_info.js" 297 | ], 298 | "run_at": "document_end", 299 | "css": [ 300 | "css/lyrics.css", 301 | "css/jquery-ui.min.css" 302 | ] 303 | }, 304 | { 305 | "matches": [ "*://music.youtube.com/*" ], 306 | "js": [ 307 | "jquery-3.3.1.min.js", 308 | "jquery-ui.min.js", 309 | "script.js", 310 | "ytmusic/extract_track_info.js" 311 | ], 312 | "run_at": "document_end", 313 | "css": [ 314 | "css/lyrics.css", 315 | "css/jquery-ui.min.css" 316 | ] 317 | }, 318 | { 319 | "matches": [ "*://www.iheart.com/*" ], 320 | "js": [ 321 | "jquery-3.3.1.min.js", 322 | "jquery-ui.min.js", 323 | "script.js", 324 | "iheart/extract_track_info.js" 325 | ], 326 | "run_at": "document_end", 327 | "css": [ 328 | "css/lyrics.css", 329 | "css/jquery-ui.min.css" 330 | ] 331 | } 332 | 333 | ], 334 | "web_accessible_resources": [ 335 | "images/*.png", 336 | "css/*.css", 337 | "fonts/*", 338 | "options/options.html", 339 | "gaana/gaana.css", 340 | "spotify/spotify.css", 341 | "pandora/pandora.css", 342 | "amazonmusic/amazonmusic.css", 343 | "soundcloud/soundcloud.css", 344 | "saavn/saavn.css", 345 | "earbits/earbits.css", 346 | "bop.fm/bop.fm.css", 347 | "googlemusic/googlemusic.css", 348 | "raaga/raaga.css", 349 | "rdio/rdio.css", 350 | "plex/plex.css", 351 | "rhapsody/rhapsody.css", 352 | "AccuRadio/AccuRadio.css", 353 | "slacker/slacker.css", 354 | "jango/jango.css", 355 | "deezer/deezer.css", 356 | "8tracks/8tracks.css", 357 | "tidal/tidal.css", 358 | "wynk/wynk.css", 359 | "groove/groove.css", 360 | "ytmusic/ytmusic.css", 361 | "iheart/iheart.css" 362 | ] 363 | } 364 | -------------------------------------------------------------------------------- /glyrics-ext/background.js: -------------------------------------------------------------------------------- 1 | var glyrics_appid = "paiehomgejkdifojcddmbinmophkibac"; 2 | var msgFromTabId; 3 | var trackInfoMessage; 4 | var title; 5 | 6 | var hostNames = [ 7 | "gaana.com", 8 | "www.saavn.com", 9 | "open.spotify.com", 10 | "play.raaga.com", 11 | "soundcloud.com", 12 | "music.amazon.com", 13 | "play.google.com", 14 | "www.earbits.com", 15 | "earbits.com", 16 | "www.pandora.com", 17 | "app.plex.tv", 18 | "127.0.0.1", 19 | "localhost", 20 | "www.accuradio.com", 21 | "www.jango.com", 22 | "deezer.com", 23 | "8tracks.com", 24 | "listen.tidal.com", 25 | "wynk.in", 26 | "music.microsoft.com", 27 | "music.youtube.com", 28 | "www.iheart.com" 29 | ]; 30 | 31 | /* Create url patterns required to create context menu */ 32 | var urlPatterns = hostNames.map(function(host){ 33 | return "*://" + host + "/*"; 34 | }); 35 | 36 | /* Build condition for each hostname */ 37 | var conditions = hostNames.map(function(host){ 38 | return new chrome.declarativeContent.PageStateMatcher({ 39 | pageUrl: {hostEquals: host} 40 | }); 41 | }); 42 | 43 | /* Create rules for showing page action */ 44 | var rules = { 45 | conditions: conditions, 46 | actions: [ new chrome.declarativeContent.ShowPageAction() ] 47 | }; 48 | 49 | function iconClicked(tab) { 50 | //console.log("GLyrics: pageAction clicked"); 51 | /* Get stored user preferences */ 52 | var appWindowChecked = localStorage["appWindow"]; 53 | 54 | if (appWindowChecked === 'true') { 55 | chrome.runtime.sendMessage(glyrics_appid, { 56 | msgType : "LaunchApp" 57 | }); 58 | } else { 59 | chrome.tabs.query({ 60 | active : true, 61 | currentWindow : true 62 | }, function(tabs) { 63 | callContentScript(tab.id, "pageIconClicked", []); 64 | }); 65 | } 66 | 67 | } 68 | 69 | function contextMenuOnClicked(info, tab) 70 | { 71 | if(info.menuItemId === "glyrics-menu"){ 72 | iconClicked(tab); 73 | } 74 | } 75 | 76 | chrome.pageAction.onClicked.addListener(iconClicked); 77 | chrome.runtime.onInstalled.addListener(function(){ 78 | chrome.declarativeContent.onPageChanged.removeRules(undefined, function() { 79 | chrome.declarativeContent.onPageChanged.addRules([ rules ]); 80 | }); 81 | chrome.contextMenus.create({ 82 | "id":"glyrics-menu", 83 | "contexts":["all"], 84 | "title":"Gaana Lyrics", 85 | "documentUrlPatterns":urlPatterns, 86 | }); 87 | }); 88 | chrome.contextMenus.onClicked.addListener(contextMenuOnClicked); 89 | 90 | 91 | 92 | /* Listen for messages from content scripts */ 93 | chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) { 94 | /* function call handler */ 95 | if (request.functionName){ 96 | var target=this[request.functionName]; 97 | if(typeof target === 'function'){ 98 | msgFromTabId = sender.tab.id; 99 | target.apply(this, request.args); 100 | } 101 | } 102 | /* save and forward track information to app event page */ 103 | else if (request.msgType === "trackInfo") { 104 | //trackInfoMessage = request; 105 | chrome.storage.local.set({'trackInfo': request}); 106 | chrome.runtime.sendMessage(glyrics_appid, request); 107 | } 108 | }); 109 | 110 | 111 | /* Listen for messages from outside like, glyrics app */ 112 | chrome.runtime.onMessageExternal.addListener( 113 | function(request, sender, sendResponse) { 114 | if (request) { 115 | if (request.msgType) { 116 | /* 117 | * this message is sent by the glyrics app to check if the 118 | * ext is installed 119 | */ 120 | if (request.msgType === "version") { 121 | console.log("Received msg from App: version; sending response"); 122 | sendResponse({ version : 1.0 }); 123 | chrome.storage.local.get('trackInfo', function(obj){ 124 | var trackInfoMessage = obj.trackInfo; 125 | if (trackInfoMessage) { 126 | console.log("Already playing. Sending trackinfo to App."); 127 | chrome.runtime.sendMessage(glyrics_appid, trackInfoMessage); 128 | } 129 | }); 130 | } 131 | } 132 | } 133 | }); 134 | 135 | function getLyricURL(artist, title) { 136 | $.ajax({ 137 | url : 'http://lyrics.wikia.com/api.php', 138 | data : { 139 | action : 'lyrics', 140 | artist : artist, 141 | song : title, 142 | fmt : 'xml' 143 | }, 144 | headers : { 145 | "X-Wikia-API-Key" : "90d9b7f2f7e0f57b66f13e5c99b287cfa189bb88" 146 | }, 147 | dataType : 'xml', 148 | type : 'GET', 149 | cache : false, 150 | complete : function(jqXHR, status) { 151 | // console.log('Status:'+status); 152 | }, 153 | error : function(jqXHR, textStatus, errorThrown) { 154 | // send error message to content script 155 | var pass_data = { 156 | 'msgType' : 'displayError', 157 | 'message' : 'An error occurred while searching lyrics for "' 158 | + title + '" by "' + artist + '". Please retry.' 159 | }; 160 | chrome.tabs.sendMessage(msgFromTabId, pass_data); 161 | }, 162 | success : function(lyricsData, status) { 163 | try { 164 | // Grab lyrics wikia song url 165 | var songURL = $(lyricsData).find("url").text(); 166 | 167 | if (!songURL) { 168 | throw ('Could not find a song URL'); 169 | } 170 | 171 | var lyrics = $(lyricsData).find("lyrics").text(); 172 | if (lyrics === 'Not found') { 173 | // send error message to content script 174 | var pass_data = { 175 | 'msgType' : 'displayError', 176 | 'msgAction' : 'searchOnLyricWiki', 177 | 'message' : 'Lyrics not found for "' 178 | + title + '" by ' + artist 179 | + ' (Search Google).
' 181 | + 'Please add lyrics at ' + 'LyricWiki.' 183 | }; 184 | chrome.tabs.sendMessage(msgFromTabId, pass_data); 185 | throw new Error('LYRICS NOT FOUND'); 186 | } 187 | 188 | getLyricsFromLyricWikiURL(songURL); 189 | 190 | } catch (err) { 191 | console.log(err.message); 192 | if (err.message !== 'LYRICS NOT FOUND') { 193 | // send error message to content script 194 | var pass_data = { 195 | 'msgType' : 'displayError', 196 | 'message' : 'An error occurred while retrieving lyrics for "' 197 | + title 198 | + '" by "' 199 | + artist 200 | + '". Please retry.' 201 | }; 202 | chrome.tabs.sendMessage(msgFromTabId, pass_data); 203 | } 204 | } 205 | } 206 | }); 207 | } 208 | 209 | function getLyricsFromLyricWikiURL(songURL) { 210 | $.ajax({ 211 | url : songURL, 212 | type : 'GET', 213 | complete : function(jqXHR, status) { 214 | // console.log('Status:'+status); 215 | }, 216 | success : function(songData, songStatus) { 217 | var lyrics = getLyricsFromRawHtml(songData); 218 | if (lyrics.length === 0) { 219 | throw ('No lyrics found'); 220 | } else { 221 | // send lyrics to content script 222 | var pass_data = { 223 | 'msgType' : 'lyrics', 224 | 'lyrics' : lyrics 225 | + '


Lyrics provided by LyricWiki.' 228 | }; 229 | chrome.tabs.sendMessage(msgFromTabId, pass_data); 230 | } 231 | } 232 | }); 233 | } 234 | 235 | function getLyricsFromRawHtml(data) { 236 | var filter = function() { 237 | // filters all text nodes and some inline elements out 238 | return this.nodeType === Node.TEXT_NODE 239 | || $(this).is('p, br, i, b, strong, em'); 240 | }; 241 | 242 | // create a div, 243 | // append .lyricsbox's direct children to it 244 | // and filter all unnecessary elements out 245 | // get the html and remove the div. 246 | return $('
').append( 247 | $(data).find('.lyricbox').contents().filter(filter)).remove().html(); 248 | } 249 | 250 | function getSongInfoFromRawHtml(data) { 251 | return $(data).find('#WikiaPageHeader h1').text(); 252 | } 253 | 254 | function sendSearchRequest(title) { 255 | $.ajax({ 256 | url : "http://lyrics.wikia.com/Special:Search", 257 | data : { 258 | search : title, 259 | fulltext : 'Search', 260 | ns0 : '1' 261 | }, 262 | type : 'GET', 263 | complete : function(jqXHR, status) { 264 | // console.log('searchOnLiricWiki:Status:'+status); 265 | }, 266 | success : function(resultsPage, songStatus) { 267 | var i = 0; 268 | var lwSearchResults = []; 269 | 270 | $(resultsPage).find('li.result').each( 271 | function(index, element) { 272 | var articleTitle = $(this).children().children('h1') 273 | .children('a').text(); 274 | var articleLink = $(this).children().children('h1') 275 | .children('a').prop('href'); 276 | 277 | // If there is a artist name before ':' 278 | if (articleTitle.indexOf(':') > 0) { 279 | // Get the song title (part after 280 | // the colon) 281 | var songTitle = articleTitle.substr( 282 | articleTitle.indexOf(':') + 1).trim(); 283 | 284 | // if the result contains in 285 | // original song title 286 | if (songTitle.toLowerCase().search( 287 | title.toLowerCase()) !== -1) { 288 | // create JSON object for each result 289 | var result = {}; 290 | result.link = articleLink; 291 | result.title = articleTitle; 292 | lwSearchResults[i] = result; 293 | i++; 294 | } 295 | } 296 | }); 297 | callContentScript(msgFromTabId, "displaySearchResults",[lwSearchResults]); 298 | } 299 | }); 300 | } 301 | 302 | function getArtistFromMusicBrainz(title, album) { 303 | var artist = 'Not Found'; 304 | var query = (!album) ? 'recording:"' + title + '"' : 'recording:"' + title 305 | + '" AND release:"' + album + '"'; 306 | 307 | $.ajax({ 308 | url : "http://musicbrainz.org/ws/2/recording", 309 | data : { 310 | query : query 311 | }, 312 | type : "GET", 313 | error : function(jqXHR, textStatus, errorThrown) { 314 | // send error message to content script 315 | var pass_data = { 316 | 'msgType' : 'displayError', 317 | 'message' : 'An error occurred while searching artist on MusicBrainz for "' 318 | + title + '". Please retry.' 319 | }; 320 | chrome.tabs.sendMessage(msgFromTabId, pass_data); 321 | console.log("Error calling MusicBrainz api!"); 322 | }, 323 | success : function(data, status) { 324 | var artistCredit = $(data).find("artist-credit"); 325 | if (artistCredit.length > 0) { 326 | artist = artistCredit[0].getElementsByTagName("artist")[0].getElementsByTagName("name")[0].textContent; 327 | console.log("Artist name retrieved from MusicBrainz: " + artist); 328 | callContentScript(msgFromTabId, "getLyrics",[artist, title, album]); 329 | } else { 330 | console.log("MusicBrainz returned 0 results"); 331 | callContentScript(msgFromTabId, "getLyrics",['Not Found', title, album]); 332 | } 333 | } 334 | }); 335 | } 336 | 337 | function callContentScript(tabid, targetFunction, args){ 338 | var message = {functionName: targetFunction, args: args}; 339 | chrome.tabs.sendMessage(tabid, message); 340 | } 341 | -------------------------------------------------------------------------------- /docs/css/responsive.css: -------------------------------------------------------------------------------- 1 | /* Default Layout: 992px. 2 | Gutters: 24px. 3 | Outer margins: 48px. 4 | Leftover space for scrollbars @1024px: 32px. 5 | ------------------------------------------------------------------------------- 6 | cols 1 2 3 4 5 6 7 8 9 10 7 | px 68 160 252 344 436 528 620 712 804 896 */ 8 | /* Tablet Layout: 768px. 9 | Gutters: 24px. 10 | Outer margins: 28px. 11 | Inherits styles from: Default Layout. 12 | ----------------------------------------------------------------- 13 | cols 1 2 3 4 5 6 7 8 14 | px 68 160 252 344 436 528 620 712 */ 15 | @media only screen and (min-width: 768px) and (max-width: 991px) { 16 | /*--------------------------------------------- 17 | Index Start 18 | -----------------------------------------------*/ 19 | /*-- 20 | wrapper Start 21 | --*/ 22 | #wrapper { 23 | text-align: center; 24 | } 25 | #wrapper .block img { 26 | padding-top: 100px; 27 | width: 50%; 28 | } 29 | /*-- 30 | content Start 31 | --*/ 32 | #content { 33 | text-align: center; 34 | } 35 | #content .block { 36 | padding-bottom: 100px; 37 | } 38 | /*-- 39 | features Start 40 | --*/ 41 | #features { 42 | text-align: center; 43 | } 44 | /*-- 45 | footer Start 46 | --*/ 47 | footer .navbar { 48 | margin-bottom: 0px; 49 | border: 0px; 50 | min-height: 40px; 51 | } 52 | footer .navbar-default { 53 | border: 0px; 54 | width: 68%; 55 | } 56 | footer .navbar-default .navbar-nav li a { 57 | color: #494949; 58 | padding: 10px 10px; 59 | font-size: 15px; 60 | } 61 | footer .navbar-default .navbar-nav li a:hover { 62 | color: #000; 63 | } 64 | /*--------------------------------------------- 65 | Index Close 66 | -----------------------------------------------*/ 67 | /*=============================================*/ 68 | /*--------------------------------------------- 69 | Work Start 70 | -----------------------------------------------*/ 71 | /*-- 72 | slider-work Start 73 | --*/ 74 | #slider-work .block h1 { 75 | font-size: 28px; 76 | } 77 | #slider-work .block p { 78 | font-size: 15px; 79 | } 80 | /*-- 81 | portfolio Start 82 | --*/ 83 | #portfolio-work .block .portfolio-manu { 84 | padding-left: 0px; 85 | } 86 | #portfolio-work .block .portfolio-contant ul li a .img-heading { 87 | padding: 5px 0 5px 13px; 88 | } 89 | #portfolio-work .block .portfolio-contant ul li a .img-heading h2 { 90 | font-size: 20px; 91 | line-height: 25px; 92 | } 93 | #portfolio-work .block .portfolio-contant ul li a .img-heading p { 94 | font-size: 11px; 95 | line-height: 20px; 96 | } 97 | #portfolio-work .block .portfolio-contant ul li a .overlay { 98 | padding-left: 15px; 99 | } 100 | #portfolio-work .block .portfolio-contant ul li a .overlay h2 { 101 | padding-top: 30px; 102 | padding-bottom: 15px; 103 | font-size: 20px; 104 | line-height: 25px; 105 | } 106 | #portfolio-work .block .portfolio-contant ul li a .overlay p { 107 | font-size: 11px; 108 | line-height: 20px; 109 | padding-top: 15px; 110 | } 111 | /*-- 112 | wrapper Start 113 | --*/ 114 | #wrapper-work ul li .items-text { 115 | padding-top: 0; 116 | padding-left: 25px; 117 | } 118 | #wrapper-work ul li .items-text h2 { 119 | padding-bottom: 10px; 120 | padding-top: 40px; 121 | } 122 | #wrapper-work ul li .items-text p { 123 | font-size: 14px; 124 | line-height: 20px; 125 | padding-right: 30px; 126 | } 127 | /*-- 128 | features Start 129 | --*/ 130 | #features-work .block ul li { 131 | width: 49%; 132 | } 133 | /*--------------------------------------------- 134 | Work close 135 | -----------------------------------------------*/ 136 | /*=============================================*/ 137 | /*--------------------------------------------- 138 | contact start 139 | -----------------------------------------------*/ 140 | #wrapper-contact .block { 141 | padding-bottom: 50px; 142 | } 143 | /*-- 144 | features-contact Start 145 | --*/ 146 | #features-contact .block ul li { 147 | width: 49%; 148 | } 149 | /*--------------------------------------------- 150 | contact close 151 | -----------------------------------------------*/ 152 | /*------------------*/ 153 | } 154 | /* Mobile Layout: 320px. 155 | Gutters: 24px. 156 | Outer margins: 34px. 157 | Inherits styles from: Default Layout. 158 | --------------------------------------------- 159 | cols 1 2 3 160 | px 68 160 252 */ 161 | @media only screen and (max-width: 767px) { 162 | /*--------------------------------------------- 163 | Index Start 164 | -----------------------------------------------*/ 165 | .heading { 166 | padding-left: 0px; 167 | } 168 | h2 { 169 | font-size: 18px; 170 | } 171 | p { 172 | font-size: 13px; 173 | } 174 | header .navbar-default .navbar-toggle { 175 | margin-top: 20px; 176 | margin-bottom: 20px; 177 | } 178 | #slider { 179 | padding-top: 90px; 180 | padding-bottom: 100px; 181 | } 182 | #slider .block { 183 | padding-left: 0px; 184 | } 185 | #slider .block h1 { 186 | font-size: 20px; 187 | } 188 | #slider .block p { 189 | font-size: 13px; 190 | } 191 | /*-- 192 | wrapper Start 193 | --*/ 194 | #wrapper { 195 | text-align: center; 196 | padding-top: 70px; 197 | padding-bottom: 100px; 198 | } 199 | #wrapper .block img { 200 | padding-top: 100px; 201 | padding-left: 0px; 202 | width: 100%; 203 | } 204 | /*-- 205 | service Start 206 | --*/ 207 | #service { 208 | padding-top: 100px; 209 | } 210 | #service .thumbnail { 211 | padding-bottom: 70px; 212 | } 213 | /*-- 214 | call-to-action Start 215 | --*/ 216 | #call-to-action p { 217 | padding: 0px 0px 40px; 218 | } 219 | #call-to-action .btn { 220 | padding: 10px 20px; 221 | font-size: 15px; 222 | } 223 | /*-- 224 | content Start 225 | --*/ 226 | #content { 227 | text-align: center; 228 | padding-top: 70px; 229 | } 230 | #content .block { 231 | padding-bottom: 100px; 232 | } 233 | #content .block h2 { 234 | padding-top: 0px; 235 | } 236 | #content .block-bottom { 237 | padding: 0px; 238 | } 239 | #content .block-bottom .item-img { 240 | padding-left: 0px; 241 | } 242 | /*-- 243 | features Start 244 | --*/ 245 | #features .features-img { 246 | text-align: center; 247 | } 248 | /*--------------------------------------------- 249 | Index Close 250 | -----------------------------------------------*/ 251 | /*=============================================*/ 252 | /*--------------------------------------------- 253 | Work Start 254 | -----------------------------------------------*/ 255 | #slider-work { 256 | padding-top: 100px; 257 | padding-bottom: 100px; 258 | } 259 | #slider-work .block { 260 | padding-left: 0px; 261 | } 262 | #slider-work .block h1 { 263 | font-size: 20px; 264 | } 265 | #slider-work .block p { 266 | font-size: 11px; 267 | line-height: 25px; 268 | } 269 | /*-- 270 | portfolio Start 271 | --*/ 272 | #portfolio-work .block .portfolio-manu { 273 | padding-left: 0px; 274 | text-align: center; 275 | } 276 | #portfolio-work .block .portfolio-manu ul li { 277 | padding: 0 8px; 278 | } 279 | #portfolio-work .block .portfolio-contant ul li { 280 | width: 100%; 281 | } 282 | #portfolio-work .block .portfolio-contant ul li a .img-heading { 283 | padding: 5px 0 5px 13px; 284 | } 285 | #portfolio-work .block .portfolio-contant ul li a .img-heading h2 { 286 | font-size: 20px; 287 | line-height: 25px; 288 | } 289 | #portfolio-work .block .portfolio-contant ul li a .img-heading p { 290 | font-size: 11px; 291 | line-height: 20px; 292 | } 293 | #portfolio-work .block .portfolio-contant ul li a .overlay { 294 | padding-left: 15px; 295 | } 296 | #portfolio-work .block .portfolio-contant ul li a .overlay h2 { 297 | padding-top: 65px; 298 | padding-bottom: 15px; 299 | font-size: 20px; 300 | line-height: 25px; 301 | } 302 | #portfolio-work .block .portfolio-contant ul li a .overlay p { 303 | font-size: 11px; 304 | line-height: 20px; 305 | padding-top: 15px; 306 | padding-right: 5px; 307 | } 308 | /*-- 309 | wrapper Start 310 | --*/ 311 | #wrapper-work ul li { 312 | float: none; 313 | width: 100%; 314 | } 315 | #wrapper-work ul li .items-text { 316 | padding-left: 15px; 317 | padding-top: 30px; 318 | } 319 | #wrapper-work ul li .items-text h2 { 320 | padding-top: 10px; 321 | padding-bottom: 15px; 322 | font-size: 20px; 323 | line-height: 25px; 324 | } 325 | #wrapper-work ul li .items-text p { 326 | font-size: 11px; 327 | line-height: 20px; 328 | padding-top: 15px; 329 | } 330 | /*-- 331 | features Start 332 | --*/ 333 | #features-work .block ul li { 334 | display: block; 335 | width: 100%; 336 | } 337 | /*--------------------------------------------- 338 | Work close 339 | -----------------------------------------------*/ 340 | /*=============================================*/ 341 | /*--------------------------------------------- 342 | contact Start 343 | -----------------------------------------------*/ 344 | /*-- 345 | slider-contact Start 346 | --*/ 347 | #slider-contact { 348 | padding-top: 100px; 349 | padding-bottom: 100px; 350 | } 351 | #slider-contact .block { 352 | padding-left: 0px; 353 | } 354 | #slider-contact .block h1 { 355 | font-size: 20px; 356 | } 357 | #slider-contact .block p { 358 | font-size: 11px; 359 | line-height: 25px; 360 | } 361 | /*-- 362 | wrapper-contact Start 363 | --*/ 364 | #wrapper-contact .block { 365 | padding-bottom: 50px; 366 | } 367 | #wrapper-contact .block .location p { 368 | width: 100%; 369 | } 370 | #wrapper-contact .block .social-media-icon a i { 371 | padding-top: 30px; 372 | } 373 | /*-- 374 | features-contact Start 375 | --*/ 376 | #features-contact .block ul li { 377 | display: block; 378 | width: 100%; 379 | } 380 | /*--------------------------------------------- 381 | contact close 382 | -----------------------------------------------*/ 383 | /*-- 384 | footer Start 385 | --*/ 386 | footer .footer-manu { 387 | display: none; 388 | } 389 | } 390 | /* Wide Mobile Layout: 480px. 391 | Gutters: 24px. 392 | Outer margins: 22px. 393 | Inherits styles from: Default Layout, Mobile Layout. 394 | ------------------------------------------------------------ 395 | cols 1 2 3 4 5 396 | px 68 160 252 344 436 */ 397 | /* Retina media query. 398 | Overrides styles for devices with a 399 | device-pixel-ratio of 2+, such as iPhone 4. 400 | ----------------------------------------------- */ 401 | -------------------------------------------------------------------------------- /glyrics-app/window.js: -------------------------------------------------------------------------------- 1 | var extId = "indphkjgcbdoaigcjlaaokkfllleolli"; 2 | var hasExtension = false; 3 | var requiredVersion = 1.0; 4 | var mainView = null; 5 | var header; 6 | var headerTitle; 7 | var headerArtist; 8 | 9 | window.onload = function() { 10 | mainView = document.getElementById('main'); 11 | header = document.getElementById("header"); 12 | 13 | pingExt(); 14 | 15 | 16 | var dialog = $( "#dialog-form" ).dialog({ 17 | autoOpen: false, 18 | height: 300, 19 | width: 350, 20 | modal: true, 21 | buttons: { 22 | "OK": function(){}, 23 | Cancel: function() { 24 | dialog.dialog( "close" ); 25 | } 26 | }, 27 | close: function() {} 28 | 29 | }); 30 | 31 | $(document).click(function(event) { 32 | if(!$(event.target).parents('dropdown').length) { 33 | $("dropdown input").prop("checked",false); 34 | } 35 | }); 36 | 37 | 38 | var alwaysOnTop=chrome.storage.local["alwaysOnTop"]; 39 | if (alwaysOnTop === undefined || alwaysOnTop === true){ 40 | $("#keep-on-top-btn").removeClass("display-none"); 41 | chrome.app.window.current().setAlwaysOnTop(true); 42 | } 43 | 44 | $("dropdown ul li.reload").click(function(){ 45 | pingExt(); 46 | $("dropdown input").prop("checked",false); 47 | }); 48 | 49 | $("dropdown ul li.change-style").click(function(){ 50 | dialog.dialog( "open" ); 51 | $("dropdown input").prop("checked",false); 52 | }); 53 | 54 | $("dropdown ul li.window-on-top").click(function(){ 55 | var alwaysOnTop=chrome.app.window.current().isAlwaysOnTop(); 56 | chrome.app.window.current().setAlwaysOnTop(!alwaysOnTop); 57 | $("dropdown ul li.window-on-top .symbol").toggleClass("display-none"); 58 | $("dropdown input").prop("checked",false); 59 | }); 60 | 61 | $("dropdown ul li.feedback").click(function(){ 62 | window.open("https://chrome.google.com/webstore/detail/gaana-lyrics-app/paiehomgejkdifojcddmbinmophkibac/reviews"); 63 | $("dropdown input").prop("checked",false); 64 | }); 65 | }; 66 | 67 | chrome.runtime.onMessageExternal.addListener(function(request, sender, 68 | sendResponse) { 69 | if (request.msgType === "trackInfo") { 70 | //console.log("lyric request received by window"); 71 | setHeader(request.artist, request.title); 72 | getLyrics(request.artist, request.title, request.album); 73 | } 74 | }); 75 | 76 | function setHeader(artist, title){ 77 | if (title){ 78 | header.innerHTML = title + ((artist)?' by ' + artist:""); 79 | }else{ 80 | header.innerHTML = "Gaana Lyrics"; 81 | } 82 | } 83 | 84 | 85 | function pingExt(){ 86 | chrome.runtime.sendMessage(extId, { 87 | msgType : "version" 88 | }, function(reply) { 89 | if (reply) { 90 | if (reply.version) { 91 | if (reply.version >= requiredVersion) { 92 | if(hasExtension === false){ 93 | hasExtension = true; 94 | document.getElementById('ext-note').remove(); 95 | } 96 | } 97 | } 98 | } 99 | }); 100 | } 101 | 102 | function getLyrics(artist, title, album) { 103 | /* check if title is present */ 104 | if (!title) { 105 | mainView.innerHTML = 'Song title is missing. Cannot search for lyrics.'; 106 | return; 107 | } 108 | 109 | /* If artist is missing try to get artist name from MusicBrainz */ 110 | if (!artist) { 111 | mainView.innerHTML = 'Artist is missing! Searching for Artist Name on MusicBrainz...'; 112 | getArtistFromMusicBrainz(title, album); 113 | /* 114 | * the above method will call getLyrics() again after search on 115 | * MusicBrainz is complere 116 | */ 117 | return; 118 | } 119 | 120 | /* Artist could not be retrieved from MusicBrainz as well */ 121 | if (artist === 'Not Found') { 122 | mainView.innerHTML = 'Artist not found! Cannot locate lyrics for ' 123 | + title 124 | + '\ 125 | (Search Google).'; 127 | searchOnLiricWiki(title); 128 | return; 129 | } 130 | 131 | /* update header, in case clicked a search result */ 132 | setHeader(artist, title); 133 | mainView.innerHTML = "Searching lyrics for " + title + " by " + artist + "..."; 134 | getURLFromLyricWiki(artist, title); 135 | 136 | } 137 | 138 | function getURLFromLyricWiki(artist, title) { 139 | $ 140 | .ajax({ 141 | url : 'http://lyrics.wikia.com/api.php', 142 | data : { 143 | action : 'lyrics', 144 | artist : artist, 145 | song : title, 146 | fmt : 'xml' 147 | }, 148 | headers : { 149 | "X-Wikia-API-Key" : "90d9b7f2f7e0f57b66f13e5c99b287cfa189bb88" 150 | }, 151 | dataType : 'xml', 152 | type : 'GET', 153 | cache : false, 154 | complete : function(jqXHR, status) { 155 | // console.log('Status:'+status); 156 | }, 157 | error : function(jqXHR, textStatus, errorThrown) { 158 | // send error message to content script 159 | console.log('error'); 160 | mainView.innerHTML = 'An error occurred while retrieving lyrics for "' 161 | + title + '" by "' + artist + '". Please retry.'; 162 | }, 163 | success : function(lyricsData, status) { 164 | try { 165 | // Grab lyrics wikia song url 166 | var songURL = $(lyricsData).find("url").text(); 167 | 168 | if (!songURL) { 169 | throw ('Could not find a song URL'); 170 | } 171 | 172 | var lyrics = $(lyricsData).find("lyrics").text(); 173 | if (lyrics === 'Not found') { 174 | mainView.innerHTML = 'Lyrics not found for ' 175 | + title 176 | + ' by ' 177 | + artist 178 | + '\ 179 | (Search Google).\ 184 |
' 185 | + 'Please add lyrics at ' + 'LyricWiki.' 188 | searchOnLiricWiki(title); 189 | throw new Error('LYRICS NOT FOUND'); 190 | } 191 | console.log(songURL); 192 | getLyricsFromLyricWikiURL(songURL); 193 | } catch (err) { 194 | if (err.message != 'LYRICS NOT FOUND') { 195 | document.getElementById('main').innerHTML = 'An error occurred while retrieving lyrics for "' 196 | + title 197 | + '" by "' 198 | + artist 199 | + '". Please retry.'; 200 | } 201 | } 202 | 203 | } 204 | 205 | }); 206 | } 207 | 208 | function getLyricsFromLyricWikiURL(songURL) { 209 | $ 210 | .ajax({ 211 | url : songURL, 212 | type : 'GET', 213 | complete : function(jqXHR, status) { 214 | // console.log('Status:'+status); 215 | }, 216 | success : function(songData, songStatus) { 217 | lyrics = getLyricsFromRawHtml(songData); 218 | if (lyrics.length === 0) { 219 | throw ('No lyrics found'); 220 | } else { 221 | document.getElementById('main').innerHTML = lyrics 222 | + '


Lyrics provided by LyricWiki.'; 224 | } 225 | } 226 | }); 227 | } 228 | 229 | function getLyricsFromRawHtml(data) { 230 | var filter = function() { 231 | // filters all text nodes and some inline elements out 232 | return this.nodeType === Node.TEXT_NODE 233 | || $(this).is('p, br, i, b, strong, em'); 234 | }; 235 | 236 | // create a div, 237 | // append .lyricsbox's direct children to it 238 | // and filter all unnecessary elements out 239 | // get the html and remove the div. 240 | return $('
').append( 241 | $(data).find('.lyricbox').contents().filter(filter)).remove() 242 | .html(); 243 | } 244 | 245 | function searchOnLiricWiki(title) { 246 | searchElement = document.createElement('div'); 247 | mainView.innerHTML = mainView.innerHTML 248 | + '

Possible Matches:'; 249 | mainView.appendChild(searchElement); 250 | searchElement.innerHTML = 'Searching with "' + title + '" ...'; 251 | 252 | $ 253 | .ajax({ 254 | url : "http://lyrics.wikia.com/Special:Search", 255 | data : { 256 | search : title, 257 | fulltext : 'Search', 258 | ns0 : '1' 259 | }, 260 | type : 'GET', 261 | complete : function(jqXHR, status) { 262 | // console.log('searchOnLiricWiki:Status:'+status); 263 | }, 264 | success : function(resultsPage, songStatus) { 265 | i = 0; 266 | lwSearchResults = []; 267 | $(resultsPage) 268 | .find('li.result') 269 | .each( 270 | function(index, element) { 271 | articleTitle = $(this).children() 272 | .children('h1').children('a') 273 | .text(); 274 | articleLink = $(this).children() 275 | .children('h1').children('a') 276 | .prop('href'); 277 | 278 | // If there is a artist name before ':' 279 | if (articleTitle.indexOf(':') > 0) { 280 | // Get the song title (part after 281 | // the colon) 282 | songTitle = articleTitle 283 | .substr( 284 | articleTitle 285 | .indexOf(':') + 1) 286 | .trim(); 287 | 288 | // if the result contains in 289 | // original song title 290 | if (songTitle.toLowerCase().search( 291 | title.toLowerCase()) !== -1) { 292 | // create element containing 293 | // the result 294 | result = document 295 | .createElement('a'); 296 | result.setAttribute('href', 297 | articleLink); 298 | result.setAttribute('target', 299 | '_blank'); 300 | result.innerHTML = articleTitle; 301 | lwSearchResults[i] = result; 302 | i++; 303 | result.onclick = function() { 304 | // do not follow the link 305 | event.returnValue = false; 306 | // Set lyricArtist and 307 | // lyricTitle to be 308 | // displayed on header 309 | elementText = event.srcElement.innerText; 310 | lyricArtist = elementText 311 | .substr( 312 | 0, 313 | elementText 314 | .indexOf(':')); 315 | lyricTitle = elementText 316 | .substr(elementText 317 | .indexOf(':') + 1); 318 | getLyricsFromLyricWikiURL(event.srcElement 319 | .getAttribute('href')); 320 | }; 321 | } 322 | } 323 | 324 | }); 325 | 326 | if (lwSearchResults.length === 0) { 327 | searchElement.innerHTML = 'No match found for "' 328 | + title + '".'; 329 | } else { 330 | searchElement.innerHTML = ''; 331 | ol = document.createElement('ol'); 332 | searchElement.appendChild(ol); 333 | for (var i = 0; i < lwSearchResults.length; i++) { 334 | li = document.createElement('li'); 335 | li.appendChild(lwSearchResults[i]); 336 | ol.appendChild(li); 337 | } 338 | } 339 | 340 | // If only one result returned and the song title matches 341 | // exactly, then fetch lyrics from the page immediately 342 | /* 343 | * if (lwSearchResults.length == 1 && 344 | * lwSearchResults[0].innerHTML.substr(lwSearchResults[0].innerHTML.indexOf(':')+1).trim().toLowerCase() 345 | * === title.toLowerCase()){ //Set lyricArtist and 346 | * lyricTitle to be displayed on header elementText = 347 | * lwSearchResults[0].innerHTML; lyricArtist = 348 | * elementText.substr(0,elementText.indexOf(':')); 349 | * lyricTitle = 350 | * elementText.substr(elementText.indexOf(':')+1); 351 | * 352 | * getLyricsFromLyricWikiURL(lwSearchResults[0].getAttribute('href')); } 353 | */ 354 | 355 | } 356 | }); 357 | } 358 | 359 | function getArtistFromMusicBrainz(title, album) { 360 | var artist = 'Not Found'; 361 | query = (!album) ? 'recording:"' + title + '"' : 'recording:"' + title 362 | + '" AND release:"' + album + '"'; 363 | 364 | $ 365 | .ajax({ 366 | url : "http://musicbrainz.org/ws/2/recording", 367 | data : { 368 | query : query 369 | }, 370 | type : "GET", 371 | error : function(jqXHR, textStatus, errorThrown) { 372 | console.log("Error calling MusicBrainz api!"); 373 | mainView.innerHTML = 'An error occurred while searching artist on MusicBrainz for "' 374 | + title + '". Please retry.'; 375 | }, 376 | success : function(data, status) { 377 | artistCredit = $(data).find("artist-credit"); 378 | if (artistCredit.length > 0) { 379 | artist = artistCredit[0].getElementsByTagName("artist")[0] 380 | .getElementsByTagName("name")[0].textContent; 381 | console.log("Artist name retrieved from MusicBrainz: " 382 | + artist); 383 | getLyrics(artist, title, album); 384 | } else { 385 | console.log("MusicBrainz returned 0 results"); 386 | getLyrics('Not Found', title, album); 387 | } 388 | } 389 | 390 | }); 391 | } -------------------------------------------------------------------------------- /docs/js/vendor/modernizr-2.6.2.min.js: -------------------------------------------------------------------------------- 1 | /* Modernizr 2.6.2 (Custom Build) | MIT & BSD 2 | * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load 3 | */ 4 | ;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d',a,""].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f