Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
1258d9b
Made the display pretty with room for controls. Organized code in fol…
newgiin May 3, 2013
4e6a054
Supports songs over an hour long
newgiin May 7, 2013
a6e12e7
Support new Google Play interface.
newgiin May 18, 2013
2cfa0fe
Scrobbles album. Continues to submit now playing after scrobble.
newgiin May 18, 2013
076176b
Play link switches to an existing Google Play tab if one is already o…
newgiin May 18, 2013
aa0ba8c
Display album name
newgiin May 21, 2013
28f34a0
Stop caching GET requests. Love button works now.
newgiin May 24, 2013
9e30a67
Updated README
newgiin May 25, 2013
bc055b8
Added last.fm to project name.
newgiin May 30, 2013
c9feaa0
Higher marquee threshold to prevent jittering.
newgiin Jun 13, 2013
01f3760
Works with Play Music update
newgiin Jun 22, 2013
1b4532c
gets time correctly
newgiin Jun 22, 2013
f87d280
Mostly finished button implementation. Some minor bugs left.
newgiin Jun 27, 2013
bc12f40
Finished player control buttons
newgiin Jun 27, 2013
6696228
woops, play/pause toggles icon now when scrobbling.
newgiin Jun 27, 2013
4034826
Removed redundant line
newgiin Jun 27, 2013
f8a8f1e
Restarts playlists correctly when scrobbling and using 'next' button
newgiin Jun 27, 2013
6ef1c85
Working on scrobbling long mixes multiple times.
newgiin Aug 16, 2013
c6003a5
Display player controls when not logged in. Only display scrobble lin…
newgiin Aug 16, 2013
b72bb36
Scrobble every 4 minutes.
newgiin Aug 16, 2013
48162a7
Some work on new scrobbling method.
newgiin Aug 23, 2013
b368c5a
Scrobbles based solely on time played rather than song position.
newgiin Aug 23, 2013
aa93922
Fixed image sprite. Images weren't isolated on Linux client.
newgiin Aug 24, 2013
211db53
Scrobble interval increased to 8 minutes.
newgiin Aug 25, 2013
1528b64
Moved the player controls down a bit.
newgiin Aug 26, 2013
a64a273
Reset time_played when at beginning of song to prevent over-scrobblin…
newgiin Aug 27, 2013
b479b19
Background page to event page. Use chrome.runtime.
newgiin Sep 10, 2013
8af2ce9
Reduced scrobble interval to 7 minutes.
newgiin Oct 2, 2013
891e008
Error logging for last.fm calls
newgiin Oct 7, 2013
9d48027
Added web_accessible_resources to manifest
newgiin Oct 12, 2013
0c6af94
Controls stay on bottom when no album present
newgiin Nov 1, 2013
913718e
Options page.Cleanup manifest.Settings in seperate file.
newgiin Nov 2, 2013
370b91a
'time_played' resets to 0 each interval even when multiple scrobbles …
newgiin Nov 2, 2013
f26d256
Nah, cleaner the old way
newgiin Nov 2, 2013
1e23fbd
Added options.html
newgiin Nov 3, 2013
cb5da2f
Moved some initialization to settings.js
newgiin Nov 3, 2013
fe784b9
Fix If-Modified-Since Header bug
May 16, 2014
0b5ea42
Merge pull request #8 from queile/google-music
newgiin Jun 9, 2014
c5976f0
Added rewind/previous song capability
fevrin May 26, 2014
35343c7
Toggle play button polls for 3 seconds. Remove whitespace.
newgiin Jul 30, 2014
498219d
Keyboard shortcuts
newgiin Aug 4, 2014
c1bebfc
Add first-run message
newgiin Aug 4, 2014
07feddd
Don't hide main content with alert message
newgiin Aug 4, 2014
ccf1922
Grabs album cover correctly.
newgiin Nov 14, 2014
ab0a34f
Don't shadow Mac keyboard shortcuts.
newgiin Nov 19, 2014
2187bac
Upload album artist when scrobbling
newgiin Jan 20, 2015
0bcd7a3
Fixed argument order for scrobble
newgiin Jan 20, 2015
424aaa0
Properly convert spaces when getting album artist
newgiin Jan 21, 2015
8cf23b7
stupid replace function
newgiin Jan 25, 2015
f34705c
marquee changed to span
gzhang1337 Feb 8, 2015
355855c
Merge pull request #21 from gzhang1337/google-music
newgiin Feb 8, 2015
efcfcd3
Update version number
newgiin Feb 10, 2015
b59beab
Upd: Moves to or opens Google Play on Last.fm authentication.
Apr 23, 2015
668470b
Oops: Tidy up indentation.
Apr 24, 2015
fe7e3fa
Merge pull request #26 from nathanbrock/open-gplay-on-auth
newgiin May 6, 2015
b25d948
Update version to 1.6.3
newgiin May 6, 2015
c95bbcc
Fix scrobbling with material UI.
newgiin May 15, 2015
294add7
Song info updates properly when you press player controls.
newgiin May 15, 2015
ae767ee
Instead of assuming that the refresh is every 2 seconds, calculate th…
DHNishi May 19, 2015
4ef685a
Merge pull request #29 from DHNishi/google-music
newgiin May 21, 2015
01d35fd
Move some stuff around.
newgiin May 21, 2015
1cb4384
Handle if HTML has paper-icon elements instead of sj-icon elements.
newgiin Oct 26, 2015
0e00030
update contentscript
newgiin Dec 11, 2015
b35716b
do not scrobble google music advertisments
byted Jan 28, 2016
a35275e
Merge pull request #33 from byted/google-music
newgiin Feb 16, 2016
2f17fd0
Bump manifest to 1.6.9
newgiin Feb 16, 2016
2da06b5
closes #38, send now playing request only once with the correct duration
tims Jun 20, 2017
9ee4f28
Merge pull request #39 from tims/google-music
newgiin Jul 29, 2017
e07033c
bump version to 1.7.0
newgiin Jul 29, 2017
8d99df2
Set indent to two spaces. Cleanup style in background.js
newgiin Jan 22, 2018
c0ebfe0
- Add logging option.
newgiin Feb 16, 2018
b5103bf
Log vars that trigger scrobble. Fix options page checkbox. Bump versi…
newgiin Aug 1, 2019
f7b9f19
Check if song length is non-null/zero before scrobbling. Not sure how…
newgiin Sep 27, 2019
51bf71c
YouTube Music integration.
newgiin May 26, 2020
6d5b9f1
Reverting some unintended changes.
newgiin May 26, 2020
5187e5f
Fix YtMusic is_playing detection - check browser tab title instead of…
bulhi Feb 7, 2021
d337834
Merge pull request #46 from bulhi/yt-music-fix
newgiin Apr 9, 2021
35f1571
Remove 'tabs' permission
newgiin Jun 19, 2021
2629b72
Update album art selector.
newgiin Jan 27, 2022
3a32f38
Update manifest to v3.
newgiin Oct 7, 2025
760a9fc
Update rest of code to be manifest v3 compatible.
newgiin Feb 18, 2026
c47ec7f
Remove old Google Music integration.
newgiin Feb 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 12 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,25 @@
Google Music Player scrobbler
Google Play Last.fm scrobbler
-----------------------------

Google Chrome plugin for scrobbling songs from Google Music Player to Last.fm

Features
========

* Scrobbles now playing songs at 70% played time
* Song information in popup window
* Cloud Player state in icon
* Love/unlove now playing song
* Option to turn scrobbling off if you do not want to send scrobbles
* Love/unlove tracks
* Toggle scrobbling

Installation
============

Install stable release from [Google Web Store](https://chrome.google.com/webstore/detail/lhlmaloocaogaldcbpimhlbimmhaonep)

Version History
===============

**Version 1.2.4**

* Spanish fixes

**Version 1.2.3**

* Google Play

**Version 1.2.2**

* Timestamp fixes
* HTTPS support

**Version 1.2.1**

* Album art image size fixed to 60x60px

**Version 1.2.0**

* Port scrobbler to Google Music Beta
Install stable release from [Google Web Store](https://chrome.google.com/webstore/detail/google-play-scrobbler/llpepekkleeoeiloijhcafgpjdnhhcbl)

Authors
=======

[Andrew Nguyen](https://github.com/newgiin)

[Alexey Savartsov](https://github.com/asavartsov), asavartsov@gmail.com

Google Music support by [Brad Lambeth](https://github.com/bradlambeth), brad@lambeth.us
Expand All @@ -54,6 +30,11 @@ Thanks to contributors:

[Caleb Brown](https://github.com/kayluhb)

Icons
=======
www.glyphicons.com
[CC by](http://creativecommons.org/licenses/by/3.0/us/)

License
=======

Expand All @@ -79,3 +60,4 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

10 changes: 0 additions & 10 deletions background.html

This file was deleted.

76 changes: 64 additions & 12 deletions css/popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,19 @@
* popup.css
* Style sheet for popup page
* Copyright (c) 2011 Alexey Savartsov <asavartsov@gmail.com>
* Licensed under the MIT license
* Licensed under the MIT license
*/

body {
padding: 10px;
margin: 0;
min-width: 300px;

font-family: "Helvetica", "Arial", sans-serif;
}

p {
span {
line-height: 100%;
padding: 0;
margin: 0;
}

a {
Expand All @@ -29,10 +27,18 @@ a:hover {

#cover-box {
float: left;
border-color: #FFC200;
border-width: 2px;
border-style: solid;
border-radius: 5px;
}

#cover {
border: none;
width: 60px;
height: 60px;
cursor: hand;
cursor: pointer;
}

#song.nosong {
Expand All @@ -48,25 +54,28 @@ a:hover {
}

#artist {
font-size: 18px;
font-weight: bold;
}

#track {
margin-top: 6px;
font-size: 14px;
#album {
min-height: 25px;
font-style: italic;
color: #999;
font-size: 80%;
}

#lastfm-buttons {
#track {
margin-top: 6px;
font-size: 14px;
}

#bottom {
margin-top: 10px;
font-size: 11px;

color: grey;
}

#scrobbling {
float: left;
}
Expand Down Expand Up @@ -103,6 +112,49 @@ a.notloved {
background-position: 0 -16px;
}

a.play, a.pause {
display: inline-block;
width: 16px;
height: 18;
background-image: url('../img/play_pause.png');
background-repeat: no-repeat;
}

a.play {
background-position: 0 0;
}

a.pause {
background-position: 0 -19px;
}

#prev-btn {
display: inline-block;
width: 25px;
height: 18px;
background-image: url('../img/prev.png');
background-repeat: no-repeat;
}

#next-btn {
display: inline-block;
width: 25px;
height: 18px;
background-image: url('../img/next.png');
background-repeat: no-repeat;
}

.clear {
clear: both;
}

.hidden {
display: none;
}

#alert {
font-size: 12px;
border-bottom: 1px dotted #000;
padding-bottom: 10px;
margin-bottom: 10px;
}
13 changes: 13 additions & 0 deletions html/lastfm_callback.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!--
lastfm_callback.html
Authorization token handler for Last.fm web-based authentication
Copyright (c) 2011 Alexey Savartsov <asavartsov@gmail.com>
Licensed under the MIT license
-->
<html>
<head><title>Last.fm Auth</title></head>
<body>
<p>Authenticating with Last.fm, please wait...</p>
<script src="../js/lastfm_callback.js"></script>
</body>
</html>
20 changes: 20 additions & 0 deletions html/options.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<html>
<head>
<title>YouTube Music Last.fm Scrobbler Options</title>
</head>
<body>
<span style="font-weight:bold">Scrobbler Options:</span>
<br/><br/>
Scrobble long tracks multiple times (once every <span id="minute_field"></span>
minutes)?: <input id="scrobble_mult" type="checkbox"/><br/>
Enable logging (for debugging): <input id="log_checkbox" type="checkbox"/><br/>
<br/>
<div style="color:#066600" id="status"></div>
<button id="save">Save</button>
<br/><br/>
To edit keyboard shortcuts, go to chrome://extensions and click<br/>
keyboard shortcuts on the bottom right of the page.

<script src="../js/options.js"></script>
</body>
</html>
53 changes: 53 additions & 0 deletions html/popup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!--
popup.html
Copyright (c) 2011 Alexey Savartsov <asavartsov@gmail.com>
Licensed under the MIT license
-->
<html>
<head>
<link rel="stylesheet" type="text/css" href="../css/popup.css">
</head>
<body>
<div id="alert" class="hidden">
Keyboard shortcuts are now available. To edit them, go to
<a id="extns_link" href="#">chrome://extensions</a> and click
"Keyboard shortcuts" at the bottom right of the page.
(<a id="dismiss_alert" href="#">dismiss</a>)
</div>
<div id="content">
<div id="main">
<div id="cover-box">
<img id="cover"/>
</div>
<div id="song">
<span id="now-playing">
<span id="artist"></span>&nbsp;-&nbsp;
<span id="track"></span>
</span>
<div id="album"></div>
<div id="controls">
<span id="lastfm-buttons">
<span id="love-button"></span>
&nbsp;&nbsp;&nbsp;
</span>
<span id="player-controls">
<a id="prev-btn" href="#"></a>
&nbsp;&nbsp;&nbsp;
<a id="play-pause-btn" href="#"></a>
&nbsp;&nbsp;&nbsp;
<a id="next-btn" href="#"></a>
</span>
</div>
</div>
</div>
<div class="clear"></div>
<div id="bottom">
<div id="scrobbling"></div>
<div id="lastfm-profile"></div>
</div>
</div>

<script src="../js/jquery-1.7.min.js"></script>
<script src="../js/popup.js"></script>
</body>
</html>
Binary file modified img/defaultcover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/next.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/play_pause.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/prev.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading