How to use the wallpaper.image function in wallpaper

To help you get started, we’ve selected a few wallpaper examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github paulrouget / riverscreen / js / main.js View on Github external
req.onsuccess = function onsuccess() {
    let blob = req.result['wallpaper.image'];
    let url = URL.createObjectURL(blob);
    console.log("wallpaper", url);
    document.body.style.backgroundImage = "url(" + url + ")";
  };
}
github mozilla-b2g / gaia / build / settings.js View on Github external
utils.joinPath('build', 'config', 'wallpaper_' +
        config.GAIA_DEVICE_TYPE + '.jpg'), config.GAIA_DIR);
  }

  if (!wallpaper.exists()) {
    wallpaper = utils.resolve(
      utils.joinPath('build', 'config', 'wallpaper' + devpixels + '.jpg'),
      config.GAIA_DIR);
  }

  if (!wallpaper.exists()) {
    wallpaper = utils.resolve(
      utils.joinPath('build', 'config', 'wallpaper.jpg'),
      config.GAIA_DIR);
  }
  settings['wallpaper.image'] = utils.getFileAsDataURI(wallpaper);
}
github mozilla-b2g / gaia / apps / operatorvariant / build / build.js View on Github external
if (wallpaper) {

    var uri;
    if (wallpaper.startsWith(this.appPrefix)) {
      uri = wallpaper;
    } else {
      var file = this.getFile(wallpaper);
      if (!file) {
        return;
      }
      uri = '/resources/' + file.leafName;
      this.addEntry(file, file.leafName);
    }

    var content = { uri: uri,
                    default: this.settings['wallpaper.image'] };

    var jsonName = 'wallpaper-' + utils.getHash(wallpaper) + '.json';
    return this.createJSON(jsonName, content);
  }
};
github mozilla-b2g / gaia / apps / collection / js / view_collection.js View on Github external
req.onsuccess = function image_onsuccess() {
        var image = req.result['wallpaper.image'];
        if (image instanceof Blob) {
          image = URL.createObjectURL(image);
        }

        resolve(image);
      };
      req.onerror = reject;
github mozilla-b2g / gaia / apps / settings / js / wallpaper.js View on Github external
reqWallpaper.onsuccess = function wallpaper_getWallpaperSuccess() {
      self.preview.src = reqWallpaper.result['wallpaper.image'];
    };
  },
github jan-os / janos / build / settings.js View on Github external
wallpaper = utils.resolve(
      utils.joinPath(config.GAIA_DISTRIBUTION_DIR, 'wallpapers', 'default.jpg'),
      config.GAIA_DIR);
  }

  if (!wallpaper.exists()) {
    wallpaper = utils.resolve(
      utils.joinPath('build', 'config', 'wallpaper' + devpixels + '.jpg'),
      config.GAIA_DIR);
  }

  if (!wallpaper.exists()) {
    wallpaper = utils.resolve(utils.joinPath('build', 'config', 'wallpaper.jpg'),
      config.GAIA_DIR);
  }
  settings['wallpaper.image'] = utils.getFileAsDataURI(wallpaper);
}

wallpaper

Manage the desktop wallpaper

MIT
Latest version published 9 months ago

Package Health Score

61 / 100
Full package analysis

Popular wallpaper functions