Skip to content

Commit

Permalink
Merge branch 'release/3.10'
Browse files Browse the repository at this point in the history
  • Loading branch information
svenackermann committed Mar 14, 2016
2 parents cba43d8 + 0dc95f1 commit 98b6dfd
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 17 deletions.
File renamed without changes.
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
_Before creating an issue, please check the following:_
- [ ] make sure you have the latest version of Chrome and Prime Player installed
- [ ] look at the [Wiki](https://github.com/svenackermann/Prime-Player-Google-Play-Music/wiki) for information regarding your issue
- [ ] check if your problem can be solved by restarting Chrome and Google Music or be re-installing Prime Player

_Please provide at least the following information:_
#### General information
- Chrome version:
- Prime Player version:
- operating system:
- country where you are using Prime Player:
- labs enabled in Google Music (if any):

#### Description
Describe your request here...

Please include affected components (e.g. miniplayer, popup, options page, toast, keyboard shortcuts, Google Music site).

_The remaining information is only required for bug reports, you can delete that if you're looking for a feature._

Did it work before (Yes, No, I don't know):

#### Steps to reproduce
1. One
2. Two
3. Three

#### Expected behavior

#### Actual behavior
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "primeplayer",
"version": "3.9.0",
"version": "3.10.0",
"dependencies": {
"jquery": "2.2.0"
"jquery": "2.2.1"
},
"devDependencies": {
"del": "^2.2.0",
Expand All @@ -19,13 +19,13 @@
"gulp-replace": "^0.5.4",
"gulp-sass": "^2.2.0",
"gulp-sourcemaps": "^1.6.0",
"gulp-uglify": "^1.5.2",
"gulp-uglify": "^1.5.3",
"gulp-zip": "^3.2.0",
"jshint": "^2.9.1",
"jshint-stylish": "^2.1.0",
"merge-stream": "^1.0.0",
"run-sequence": "^1.1.5",
"yargs": "^4.1.0"
"yargs": "^4.3.1"
},
"scripts": {
"preinstall": "npm i -g gulp"
Expand Down
3 changes: 3 additions & 0 deletions src/_locales/de/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,9 @@
"setting_lyricsWidth": {
"message": "Breite (in Pixeln) der Songtext-Anzeige in Google Music"
},
"setting_lyricsOpacity": {
"message": "Deckkraft der Songtext-Anzeige in Google Music"
},
"setting_skipSongSeconds": {
"message": "Titel nach x Sekunden Wiedergabe wechseln (0=deaktiviert)"
},
Expand Down
4 changes: 4 additions & 0 deletions src/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,10 @@
"message": "Width (in pixels) of lyrics panel in Google Music",
"description": "label for option to change the width for the lyrics panel"
},
"setting_lyricsOpacity": {
"message": "Opacity of lyrics panel in Google Music",
"description": "label for option to change the opacity for the lyrics panel"
},
"setting_skipSongSeconds": {
"message": "Change song after x seconds played (0=disabled)",
"description": "label for option to skip to next song after x seconds"
Expand Down
3 changes: 2 additions & 1 deletion src/css/gpm.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
font-size: 11px;
width: 250px;
position: fixed;
right: 20px;
left: 10px;
bottom: 100px;
top: 70px;
background-color: #fafafa;
border: 1px solid #d1d1d1;
padding: 3px;
display: none;
z-index: 1600;
}

#ppLyricsTitle {
Expand Down
4 changes: 3 additions & 1 deletion src/js/bp.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ function fixForUri(string) {
lyricsProviders: [],
lyricsFontSize: 11,
lyricsWidth: 250,
lyricsOpacity: 0.9,
miniplayerSizing: {
normal: { width: 310, height: 153, left: 0, top: 0 },
compact1: { width: 306, height: 118, left: 0, top: 0 },
Expand Down Expand Up @@ -708,6 +709,7 @@ function fixForUri(string) {
enabled: localSettings.lyrics && settings.lyricsInGpm,
fontSize: localSettings.lyricsFontSize,
width: localSettings.lyricsWidth,
opacity: localSettings.lyricsOpacity,
autoReload: settings.lyricsAutoReload
});
}
Expand Down Expand Up @@ -2109,7 +2111,7 @@ function fixForUri(string) {
});
});
localSettings.al("lastfmSessionName", calcScrobbleTime);
localSettings.al("lyrics lyricsFontSize lyricsWidth", postLyricsState);
localSettings.al("lyrics lyricsFontSize lyricsWidth lyricsOpacity", postLyricsState);
localSettings.w("notificationsEnabled", function(val, old) {
if (val) initNotifications();
else if (old) GA.event(GA_CAT_OPTIONS, "notifications-disabled");
Expand Down
13 changes: 7 additions & 6 deletions src/js/cs.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,14 @@ $(function() {

/** Adjust the music content size to make the lyrics container fit in the page. */
function contentResize() {
$("#music-content").css("width", $("#content-container").width() - $("#ppLyricsContainer").width() - 10 + "px");
var lyricsWidth = $("#ppLyricsContainer").width() + 10;
$("#mainPanel").css({ width: $("#content-container").width() - lyricsWidth + "px", left: lyricsWidth + "px" });
}

/** Undo the music content resize. */
function resetContentResize() {
$(window).off("resize", contentResize);
$("#music-content").css("width", "");
$("#mainPanel").css("width", "").css("left", "");
}

/** Show/hide the lyrics container. */
Expand All @@ -181,7 +182,7 @@ $(function() {
}

/** Setup lyrics feature on the site. */
function enableLyrics(fontSize, width) {
function enableLyrics(fontSize, width, opacity) {
if (!$("#ppLyricsButton").length) {
$("<img id='ppLyricsButton'/>")
.attr("src", getExtensionUrl("img/cmd/openLyrics.png"))
Expand All @@ -192,9 +193,9 @@ $(function() {
$("<div id='ppLyricsContainer'><div id='ppLyricsTitle'><a class='reloadLyrics'></a><div></div></div><div id='ppLyricsScroller'><div id='ppLyricsContent'></div><div id='ppLyricsCredits'></div></div></div>")
.on("click", ".reloadLyrics", loadLyrics.bind(window, null))
.css({ bottom: $("#player").height() + 5 + "px", top: $("#material-app-bar").height() + 5 + "px" })
.insertAfter("#music-content");
.appendTo("body");
}
$("#ppLyricsContainer").css({ "font-size": fontSize + "px", width: width });
$("#ppLyricsContainer").css({ "font-size": fontSize + "px", width: width, opacity: opacity });
if ($("#ppLyricsContainer").is(":visible")) contentResize();
}

Expand Down Expand Up @@ -1009,7 +1010,7 @@ $(function() {
else hideConnectedIndicator();
break;
case "lyricsState":
if (msg.enabled) enableLyrics(msg.fontSize, msg.width);
if (msg.enabled) enableLyrics(msg.fontSize, msg.width, msg.opacity);
else disableLyrics();
lyricsAutoReload = msg.autoReload;
break;
Expand Down
7 changes: 4 additions & 3 deletions src/js/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,12 @@ chrome.runtime.getBackgroundPage(function(bp) {
* @param prop the option name
* @param min the minimum value to set, or null/undefined if not needed
* @param max the maximum value to set, or null/undefined if not needed
* @param step the step value to set, or null/undefined if not needed (default: 1)
* @param theSettings the settings object
* @return the number input element
*/
function initNumberInput(prop, min, max, theSettings) {
var input = $("<input type='number'>").attr("min", min).attr("max", max);
function initNumberInput(prop, min, max, step, theSettings) {
var input = $("<input type='number'>").attr("min", min).attr("max", max).attr("step", step);
input.val(theSettings[prop]).blur(function() {
var value = parseFloat($(this).val());
if ($.isNumeric(min) && value < min || $.isNumeric(max) && value > max) $(this).val(theSettings[prop]);
Expand Down Expand Up @@ -519,7 +520,7 @@ chrome.runtime.getBackgroundPage(function(bp) {
}
$(".i-n").each(function() {
var inputContainer = $(this);
initNumberInput(this.id, inputContainer.data("min"), inputContainer.data("max"), getSettings(inputContainer));
initNumberInput(this.id, inputContainer.data("min"), inputContainer.data("max"), inputContainer.data("step"), getSettings(inputContainer));
});
$(".i-c").each(function() {
initCheckbox(this.id, getSettings($(this)));
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Prime Player for Google Play Music\u2122",
"short_name": "__MSG_extTitle__",
"description": "__MSG_extDesc__",
"version": "3.9",
"version": "3.10",
"author": "Sven Ackermann",
"homepage_url": "https://chrome.google.com/webstore/detail/prime-player-for-google-p/npngaakpdgeaajbnidkkginekmnaejbi",
"minimum_chrome_version": "43",
Expand Down
3 changes: 2 additions & 1 deletion src/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
<div class="sub v-2.10 adv local i-n" id="lyricsFontSize" data-min="1"></div>
<div class="sub v-2.9 i-c" id="lyricsInGpm"></div>
<div class="sub2 v-2.10 adv local i-n" id="lyricsWidth" data-min="50"></div>
<div class="sub2 v-3.10 adv local i-n" id="lyricsOpacity" data-min="0" data-max="1" data-step="0.01"></div>
</fieldset>
<fieldset class="lookfeel">
<legend id="legendLookfeel"></legend>
Expand Down Expand Up @@ -167,7 +168,7 @@ <h2>Filter</h2>
</div>
<div id="credits">
<h2>Credits</h2>
<div>Copyright (c) 2013-2015, Sven Ackermann<br/>Licensed under the BSD license.</div>
<div>Copyright (c) 2013-2016, Sven Ackermann<br/>Licensed under the BSD license.</div>
<div class="sociallinks">
<a target="_blank" href="https://github.com/svenackermann" data-network="github"><img alt="GitHub" src="img/link-github.png"></a>
<a target="_blank" href="http://www.last.fm/user/djdixit" data-network="lastfm"><img alt="Last.fm" src="img/link-lastfm.png"></a>
Expand Down

0 comments on commit 98b6dfd

Please sign in to comment.