This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const crypto = require('crypto') | |
const key = 'salt_from_the_user_document' | |
const plaintext = '56d008a27c36552a0f97b291' | |
const cipher = crypto.createCipher('aes-256-cbc', key) | |
const decipher = crypto.createDecipher('aes-256-cbc', key) | |
let encryptedPassword = cipher.update(plaintext, 'utf8', 'base64') | |
encryptedPassword += cipher.final('base64') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setTimeout(updateDockBadge, 1000) | |
setTimeout(updateDockBadge, 3000) | |
setInterval(updateDockBadge, 5000) | |
function updateDockBadge() { | |
var inboxLink = document.querySelector('a[href*="shva=1#inbox"]') | |
, badge = window.fluid.dockBadge | |
if (inboxLink && inboxLink.href && inboxLink.href.indexOf('mail.google.com') > -1) { | |
var match = inboxLink.title.match(/\((\d+)\)$/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.onload = function(){ | |
var doc = document | |
, img = doc.createElement('img') | |
, div = doc.createElement('div') | |
, body = doc.getElementsByTagName('body')[0]; | |
img.className = 'preload'; | |
img.style.cssText = ';position:absolute;top:-999em;left:-999em;width:0;height:0;visibility:hidden;'; | |
// ajax loaded or predefined img list | |
var arr = imgList | |
, str |