if (window.chrome && window.chrome.storage) {
window.chrome.storage.sync.get(function (cfg) {
settings = cfg;
- console.log(settings);
if (callback) {
callback.apply(this, callbackArgs);
}
export function writeSetting (name, value) {
"use strict";
if (window.chrome && window.chrome.storage) {
- //console.log("writeSetting:", name, value);
if (settings[name] !== value) {
settings[name] = value;
window.chrome.storage.sync.set(settings);
/*jslint white: false */
/*global console */
+import * as Log from './util/logging.js';
export default {
/* Convert data (an array of integers) to a Base64 string. */
var padding = (data.charAt(i) === base64Pad);
// Skip illegal characters and whitespace
if (c === -1) {
- console.error("Illegal character code " + data.charCodeAt(i) + " at position " + i);
+ Log.Error("Illegal character code " + data.charCodeAt(i) + " at position " + i);
continue;
}