Browse Source

move data in userJS storage

master
artem 6 years ago
parent
commit
e461fa47b3
  1. 6
      script.js

6
script.js

@ -18,8 +18,6 @@
// ==/UserScript== // ==/UserScript==
var blackList = {}; var blackList = {};
load(); load();
if (blackList == null)
blackList = {};
var peaple = JSON.stringify({ var peaple = JSON.stringify({
name: "", name: "",
url: "" url: ""
@ -127,9 +125,9 @@ function genBlackList() {
} }
function save() { function save() {
localStorage.setItem('blackList', JSON.stringify(blackList)); GM_setValue("blackList",JSON.stringify(blackList));
} }
function load() { function load() {
blackList = JSON.parse(localStorage.getItem('blackList')); blackList = JSON.parse(GM_getValue("blackList","{}"));
} }

Loading…
Cancel
Save