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
{ | |
type: 'LISTS_REFRESH_FULFILLED', | |
payload: { | |
data: [ | |
{icon: 'rss', name: 'RSS', id: 1}, | |
] | |
} | |
} |
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
new Date(Date.now()).toLocaleString(); |
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
async function mainFuction() { | |
var p = new Promise(function(resolve, reject){ | |
chrome.storage.sync.get({"disableautoplay": true}, function(options){ | |
resolve(options.disableautoplay); | |
}) | |
}); | |
const configOut = await p; | |
console.log(configOut); | |
} |
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
function getUrlParameter(name) { | |
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]'); | |
var regex = new RegExp('[\\?&]' + name + '=([^&#]*)'); | |
var results = regex.exec(location.search); | |
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' ')); | |
}; |
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
const objectToQueryString = queryParameters => { | |
return queryParameters | |
? Object.entries(queryParameters).reduce((queryString, [key, val], index) => { | |
const symbol = queryString.length === 0 ? '?' : '&'; | |
queryString += typeof val === 'string' ? `${symbol}${key}=${val}` : ''; | |
return queryString; | |
}, '') | |
: ''; | |
}; |
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
const crypto = require('crypto') | |
const mongoose = require('mongoose') | |
const bcrypt = require('bcryptjs') | |
const jwt = require('jsonwebtoken') | |
const uniqueValidator = require('mongoose-unique-validator') | |
const Schema = mongoose.Schema | |
const UserSchema = new Schema( |
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
var mySchema = new Schema({ | |
name: { | |
type: String | |
}, | |
createdAt: { | |
type: Date, | |
default: Date.now | |
} | |
}); |
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
const users = JSON.parse( | |
fs.readFileSync(`${__dirname}/_data/users.json`, 'utf-8') | |
) |
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
{"api":"mtop.common.getTimestamp","v":"*","ret":["SUCCESS::接口调用成功"],"data":{"t":"1586519130440"}} | |
http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp | |
2.苏宁时间服务器接口api: | |
http://quan.suning.com/getSysTime.do |
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
https://a.jd.com//ajax/queryServerData.html | |
OlderNewer