Commit 98a716ff by Zatsune No Mokou

Finish 11.12.0

parents 06a987a4 9b8f5863
live_notifier@zatsunenomokou.eu-*.xpi
live_notifier@zatsunenomokou.eu-*.rdf
dailymotionsstream@zatsunenomokou.eu*.xpi
live_notifier_dev_*.zip
live_notifier-*.zip
.goutputstream*
......@@ -8,6 +5,5 @@ live_notifier-*.zip
*.pem
*.crx
tmp/
firefox/
TODO.md
node_modules
\ No newline at end of file
......@@ -8,6 +8,10 @@
* Sync support ([Bug 1311710](https://bugzilla.mozilla.org/show_bug.cgi?id=1311710) and ~~[Bug 1220494 (RESOLVED FIXED)](https://bugzilla.mozilla.org/show_bug.cgi?id=1220494)~~ )
* Websites CSP applied to Content Scripts, and should not happen ([Bug 1267027](https://bugzilla.mozilla.org/show_bug.cgi?id=1267027))
# 11.12.0
* +: Panel - experimented level - Show icon on streams with error(s)
* Fix: Option page - unused function;
# 11.11.0
* Fix: YouTube Patreon password, because of the quotas limits getting too close.
......
......@@ -2,7 +2,7 @@
"addons": {
"livenotifier_dev@zatsunenomokou.eu": {
"updates": [
{ "version": "11.11.0",
{ "version": "11.12.0",
"update_link": "https://gitlab.com/ZatsuneNoMokou/live_notifier/raw/master/dist/live_notifier_dev.xpi",
"applications": {
"gecko": { "strict_min_version": "52" } } }
......
{
"name": "live_notifier",
"version": "11.10.9",
"version": "11.12.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......
{
"name": "live_notifier",
"version": "11.11.0",
"version": "11.12.0",
"description": "Be notified of streams from Dailymotion, Mixer, Smashcast, Twitch and Youtube.",
"dependencies": {
"dom-delegate": "^2.0.3",
......
......@@ -382,6 +382,20 @@ body[data-theme='light'] .debugItem[data-stream-website="hitbox"] .debugTitle::b
background-image: url("../offline-stream.svg");
}
.item-stream .erroredItem-icon {
display: none;
}
body.showAdvanced.showExperimented .item-stream .erroredItem-icon {
content: url('/data/images/warning-34621.svg');
display: inline-block;
height: 1.5em;
margin-right: 0.3em;
vertical-align: middle;
width: 1.5em;
}
.item-stream.offline > span {
display: block;
}
......
......@@ -1131,6 +1131,10 @@ function checkResponseValidity(website, response){
consoleMsg("warn", `[${website}] Unable to get stream state (error detected).`);
return "error";
break;
case "error-unavailable":
consoleMsg("warn", `[${website}] Unable to get stream state (unavailable).`);
return "error-unavailable";
break;
case "vod":
consoleMsg("warn", `[${website}] Unable to get stream state (vod detected).`);
return "vod";
......@@ -1527,6 +1531,7 @@ async function processPrimary(id, contentId, website, streamSetting, response){
return "StreamChecked";
}
} else {
liveStatus.get(website).get(id).get(contentId).liveStatus.lastCheckStatus = responseValidity;
return responseValidity;
}
//doStreamNotif(website, id, contentId, streamSetting);
......
......@@ -183,18 +183,10 @@ function refreshSettings(event){
}
let body = document.querySelector("body");
if(prefId === "showAdvanced"){
if(getPreference("showAdvanced")){
body.classList.add("showAdvanced");
} else {
body.classList.remove("showAdvanced");
}
body.classList.toggle("showAdvanced", getPreference("showAdvanced"));
}
if(prefId === "showExperimented"){
if(getPreference("showExperimented")){
body.classList.add("showExperimented");
} else {
body.classList.remove("showExperimented");
}
body.classList.toggle("showExperimented", getPreference("showExperimented"));
}
if(prefId === "panel_theme" || prefId === "background_color" && typeof theme_update === "function"){
theme_update();
......
......@@ -28,7 +28,6 @@ function sendDataToMain(id, data){
loadPreferences("section#preferences");
let loadJS = browser.extension.getBackgroundPage().loadJS;
function init(){
loadTranslations();
}
......
......@@ -8,6 +8,8 @@ const applyPanelSize = async ()=>{
body = document.body
;
body.classList.toggle("showAdvanced", backgroundPage.getPreference("showAdvanced"));
body.classList.toggle("showExperimented", backgroundPage.getPreference("showExperimented"));
body.classList.toggle("hasTouch", appGlobal.hasTouch(window));
body.style.height = backgroundPage.getPreference("panel_height");
......
<div id="{{streamWebsite}}/{{streamId}}/{{contentId}}" class="item-stream cursor{{#online}} onlineItem{{/online}}{{^online}} offlineItem{{/online}}"
<div id="{{streamWebsite}}/{{streamId}}/{{contentId}}" class="item-stream cursor{{#online}} onlineItem{{/online}}{{^online}} offlineItem{{/online}}{{#withError}} erroredItem{{/withError}}"
{{#streamStatus}}
data-stream-status='{{streamStatus}}' data-stream-status-lowercase='{{streamStatusLowercase}}'
{{/streamStatus}}
......@@ -13,7 +13,7 @@
<figure class="streamPicture hide" {{#usePictureLazyLoading}}data-src="{{streamLogo}}"{{/usePictureLazyLoading}}></figure>
{{#online}}
<div>
{{/online}}<span class="streamTitle">{{streamName}}</span>{{#online}}
{{/online}}<span class="streamTitle">{{#withError}}<span class="erroredItem-icon"></span>{{/withError}}{{streamName}}</span>{{#online}}
{{#streamCurrentViewers}}<span class="streamCurrentViewers" data-stream-current-viewers="{{streamCurrentViewers}}"></span>{{/streamCurrentViewers}}
</div>
<div>
......
......@@ -42,7 +42,9 @@ const twitch = {
"checkResponseValidity":
function(data){
if(data.hasOwnProperty("error")){
if(typeof data.message === "string"){
if(typeof data.status === "number" && /^4\d*$/.test(data.status) === true){
return "error-unavailable";
} else if(typeof data.message === "string"){
return data.message;
} else if(typeof data.error === "string"){
return data.error;
......
......@@ -11,7 +11,7 @@
"short_name": "LiveNotifierDev",
"description": "__MSG_extShortDesc__",
"author": "Zatsune No Mokou",
"version": "11.11.0",
"version": "11.12.0",
"icons": {
"96": "/icon_96.png",
"128": "/icon_128.png"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment