Skip to content

Commit

Permalink
0.0.5b
Browse files Browse the repository at this point in the history
Closes #86
Closes #84
  • Loading branch information
ParticleCore committed Jul 27, 2017
1 parent a9014f5 commit 43bb2fd
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions src/userscript/Iridium.user.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ==UserScript==
// @version 0.0.4b
// @version 0.0.5b
// @name Iridium
// @namespace https://github.com/ParticleCore
// @description YouTube with more freedom
Expand Down Expand Up @@ -188,7 +188,7 @@
type: "checkbox",
value: false,
i18n: {
label: "Preview videos by hovering the thumbnails"
label: "Play videos by hovering the thumbnails"
}
},
thumbnail_preview_mute: {
Expand All @@ -198,7 +198,7 @@
type: "checkbox",
value: false,
i18n: {
label: "Shift key toggles audio on video preview"
label: "Shift key toggles audio on video thumbnail playback"
}
}
},
Expand Down Expand Up @@ -3377,9 +3377,21 @@
},
saveSettings: function (single_setting) {

var settings;

if (single_setting in user_settings) {

settings = user_settings[single_setting];

} else {

settings = user_settings;

}

window.dispatchEvent(new CustomEvent(receive_settings_from_page, {
detail: {
settings: user_settings[single_setting] || user_settings,
settings: settings,
single_setting: single_setting
}
}));
Expand Down Expand Up @@ -3604,11 +3616,11 @@
var locale_request;
var updated_settings;

if ((updated_settings = custom_event.detail.settings)) {
if ((updated_settings = custom_event.detail.settings) !== undefined) {

if (custom_event.detail.single_setting) {

if (this.user_settings[custom_event.detail.single_setting]) {
if (custom_event.detail.single_setting in this.user_settings) {

this.user_settings[custom_event.detail.single_setting] = custom_event.detail.settings;

Expand Down Expand Up @@ -3677,7 +3689,7 @@
holder = document.createElement("link");
holder.rel = "stylesheet";
holder.type = "text/css";
holder.href = "https://particlecore.github.io/Iridium/css/Iridium.css?v=0.0.4b";
holder.href = "https://particlecore.github.io/Iridium/css/Iridium.css?v=0.0.5b";

document.documentElement.appendChild(holder);

Expand Down

0 comments on commit 43bb2fd

Please sign in to comment.