Static Site Generator Test
Powered by VuePress v2 and Github Pages
VuePress v2 guide: https://v2.vuepress.vuejs.org/zh/guide/
VuePress v2 reference: https://v2.vuepress.vuejs.org/zh/reference/config.html
MyChromeExtension
Static Site Generator Test
Powered by VuePress v2 and Github Pages
VuePress v2 guide: https://v2.vuepress.vuejs.org/zh/guide/
VuePress v2 reference: https://v2.vuepress.vuejs.org/zh/reference/config.html
getEventListeners 无法在 JS 中使用
window.document.body.onmouseover = function(event){
var event_target = event.target;
//console.log('onmouseover : ' + event_target);
if(event_target['title'] === null || event_target['title'] === ''){
event_target['title'] = 'onmouseover : ' + event_target.innerHTML.replace(' ', '');
}
else if(event_target['title'] !== null && event_target['title'].indexOf('onmouseover : ') === -1){
event_target['title'] += "\r\n\r\n" + 'onmouseover : ' + event_target.innerHTML.replace(' ', '');
}
}
var my_chrome_extension_js_settings = {};
var my_show_storage_usage = function () {
chrome.storage.sync.getBytesInUse(null, function(data) {
console.log('MyChromeExtension storage sync usage: ' + data + ' Bytes');
});
chrome.storage.sync.get(null, function(data) {
console.log('MyChromeExtension storage sync load: ' + JSON.stringify(data));
my_chrome_extension_js_settings = data;
localStorage.setItem('my_chrome_extension_js_settings', JSON.stringify(my_chrome_extension_js_settings));
});
};
var my_clear_storage_usage = function () {
chrome.storage.sync.clear();
};
my_show_storage_usage();
var my_set_js_setting = function (key, value) {
var js_setting = {};
js_setting[key] = value;
var js_file = my_get_loaded_js();
var data = {};
data[js_file] = js_setting;
my_chrome_extension_js_settings[js_file] = js_setting;
localStorage.setItem('my_chrome_extension_js_settings', JSON.stringify(my_chrome_extension_js_settings));
chrome.storage.sync.set(data, function() {
console.log('MyChromeExtension storage sync set ok: ' + JSON.stringify(data));
});
console.log('MyChromeExtension my_set_js_setting: ' + JSON.stringify(data));
};
var my_get_js_setting = function (key) {
chrome.storage.sync.get(null, function(data) {
console.log('MyChromeExtension storage sync get ok: ' + JSON.stringify(data));
my_chrome_extension_js_settings = data;
localStorage.setItem('my_chrome_extension_js_settings', JSON.stringify(my_chrome_extension_js_settings));
});
var value = undefined;
var js_file = my_get_loaded_js();
var js_setting = my_chrome_extension_js_settings[js_file];
if(js_setting && js_setting[key]){
value = js_setting[key];
}
else {
var tmp_settings = JSON.parse(localStorage.getItem('my_chrome_extension_js_settings'));
if(tmp_settings && tmp_settings[js_file] && tmp_settings[js_file][key]){
value = tmp_settings[js_file][key];
}
}
var data = {};
data[key] = value;
console.log('MyChromeExtension my_get_js_setting: ' + JSON.stringify(data));
return value;
};
chrome.storage.onChanged.addListener(function(changes, areaName){
console.log('MyChromeExtension storage ' + areaName + ' changed: ' + JSON.stringify(changes));
// {"chrome-extension://iklbhcbmbooeeckkjljbmoekngggplbd/site/all.js":{"newValue":{"MyChromeExtension":"MyChromeExtension"}}}
// {"chrome-extension://iklbhcbmbooeeckkjljbmoekngggplbd/site/all.js":{"oldValue":{"MyChromeExtension":"MyChromeExtension"}}}
});
my_set_js_setting('MyChromeExtension', 'MyChromeExtension');
my_get_js_setting('MyChromeExtension');
my_clear_storage_usage();
document.querySelectorAll('.exam-content-copy')[0].style.setProperty('user-select', 'auto')
document.querySelector('iframe').contentWindow.scrollBy(0, 1000000);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.