Skip to content

Commit

Permalink
Added ggpht.com permission for channel profiles also changed icon to …
Browse files Browse the repository at this point in the history
…the author's icon
  • Loading branch information
Wassup789 committed Sep 17, 2016
1 parent fec4944 commit 8952108
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ This code is licensed under the MIT License.
- identity (For subscription importing & watch later)
- \*://\*.youtube.com/\*
- \*://\*.ytimg.com/\*
- \*://\*.ggpht.com/\*

## Downloads

Expand Down
4 changes: 4 additions & 0 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@
"description": "The label for the upload sound button",
"message": "Upload Sound"
},
"settings_editSettings_notificationCustomizer": {
"description": "The label for the notification customizer button",
"message": "Notification Customizer"
},
"settings_vertSettings_viewChangelog": {
"description": "The label for the view changelog button",
"message": "View Changelog"
Expand Down
5 changes: 4 additions & 1 deletion css/settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,13 @@ paper-toolbar paper-tabs {
#settings_notifications_volume {
width: 90px;
}
#settings_refresh, #settings_import {
#settings_refresh, #settings_import, #settings_notificationCustomizer {
width: 100%;
background: #8BC34A;
}
#settings_notificationCustomizer {
background: #6C6AEC;
}
#settings_import.double, #settings_import_changeUser {
width: 50%;
margin-right: 5px;
Expand Down
Binary file added img/alpha.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var wyn = {};
"notification_watchlater": getString("notificationWatchLater"),
"notification_watchlater_icon": "img/ic_watchlater.png",
"notification_main_icon": "img/ic_youtube.png",
"notification_appIconMaskUrl": "img/alpha.png",
"notification_log_check": getString("notificationLogCheck"),
"notification_log_new": getString("notificationLogNew"),
"snackbar_nonewvideos": getString("snackbarNoNewVideos"),
Expand Down Expand Up @@ -678,7 +679,8 @@ function checkYoutube(num, batch, isNewItem) {
title: trimTitle(info.latestVideo.title, info.name),
message: info.latestVideo.description,
imageUrl: info.latestVideo.thumbnail,
iconUrl: wyn.strings.notification_main_icon,
/*iconUrl: wyn.strings.notification_main_icon,*/
iconUrl: channels[num].thumbnail,
contextMessage: info.latestVideo.duration + " | "+ info.latestVideo.views.toLocaleString() + " " + wyn.strings.info_views + " | " + likesa.toLocaleString({style: "percent"}) + "% " + wyn.strings.info_likes + " | " + dislikesa.toLocaleString({style: "percent"}) + "% " + wyn.strings.info_dislikes,
buttons: [{
title: wyn.strings.notification_watch,
Expand Down Expand Up @@ -1002,7 +1004,8 @@ wyn.forceNotification = function(id) {
title: trimTitle(info.latestVideo.title, info.name),
message: info.latestVideo.description,
imageUrl: info.latestVideo.thumbnail,
iconUrl: wyn.strings.notification_main_icon,
/*iconUrl: wyn.strings.notification_main_icon,*/
iconUrl: info.thumbnail,
contextMessage: info.latestVideo.duration + " | "+ info.latestVideo.views.toLocaleString() + " " + wyn.strings.info_views + " | " + likesa.toLocaleString({style: "percent"}) + "% " + wyn.strings.info_likes + " | " + dislikesa.toLocaleString({style: "percent"}) + "% " + wyn.strings.info_dislikes,
buttons: [{
title: wyn.strings.notification_watch,
Expand Down
3 changes: 3 additions & 0 deletions js/settings_edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,9 @@ function registerListeners(){
$("#settings_addbtn_viewsubs").on("click", function(){
chrome.tabs.create({url: "https://www.youtube.com/subscription_manager"});
});
$("#settings_notificationCustomizer").on("click", function(){
chrome.tabs.create({url: "chrome-extension://" + chrome.runtime.id + "/pages/edit-notification.html"});
});
$("#settings_import").on("click", function(){
requestImportToken();
});
Expand Down
3 changes: 2 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"unlimitedStorage",
"identity",
"*://*.youtube.com/*",
"*://*.ytimg.com/*"
"*://*.ytimg.com/*",
"*://*.ggpht.com/*"
],
"browser_action": {
"default_icon": "img/48.png",
Expand Down
7 changes: 7 additions & 0 deletions settings_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<link rel="import" href="bower_components/iron-icons/av-icons.html">
<link rel="import" href="bower_components/iron-icons/communication-icons.html">
<link rel="import" href="bower_components/iron-icons/social-icons.html">
<link rel="import" href="bower_components/iron-icons/editor-icons.html">

<link rel="stylesheet" type="text/css" href="css/settings.css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
Expand Down Expand Up @@ -305,6 +306,12 @@
</paper-button>
</div>
</div>
<div class="settingRow">
<paper-button id="settings_notificationCustomizer" raised>
<iron-icon icon="editor:mode-edit"></iron-icon>
<span i18n="settings_editSettings_notificationCustomizer"></span>
</paper-button>
</div>
<div class="settingRow">
<paper-button id="settings_import" raised>
<iron-icon icon="communication:import-export"></iron-icon>
Expand Down

0 comments on commit 8952108

Please sign in to comment.