Skip to content
This repository has been archived by the owner on Mar 23, 2018. It is now read-only.

Commit

Permalink
0.2.9
Browse files Browse the repository at this point in the history
 - Fixed error when trying to load default settings
  • Loading branch information
ParticleCore committed Jun 30, 2015
1 parent 5f5ea06 commit 2873f4c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Userscript/YouTubePlus.user.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ==UserScript==
// @version 0.2.8
// @version 0.2.9
// @name YouTube +
// @namespace https://github.com/ParticleCore
// @description YouTube with more freedom
Expand Down Expand Up @@ -3312,7 +3312,7 @@
}
}
if (!event && userscript) {
event = JSON.parse(window.GM_getValue('particleSettings', {}));
event = JSON.parse(window.GM_getValue('particleSettings', '{}'));
}
if (event) {
event = JSON.stringify(event.particleSettings || event);
Expand All @@ -3335,7 +3335,7 @@
function xhr(details) {
details = details.data;
function settingsHandler(item) {
var object = (item && item.particleSettings) || (userscript && JSON.parse(window.GM_getValue('particleSettings', {}))) || {};
var object = (item && item.particleSettings) || (userscript && JSON.parse(window.GM_getValue('particleSettings', '{}'))) || {};
function buildSettings(keys) {
object[keys] = details.set[keys];
}
Expand All @@ -3350,7 +3350,7 @@
}
}
if (userscript) {
updateSettings(JSON.parse(window.GM_getValue('particleSettings', {})));
updateSettings(JSON.parse(window.GM_getValue('particleSettings', '{}')));
}
}
if (typeof details === 'object' && (details.set || details.get || details.replace)) {
Expand Down

0 comments on commit 2873f4c

Please sign in to comment.