- Text Content Generator - http://www.lipsum.com
- Favicon Generator - http://tools.dynamicdrive.com/favicon
- Data Generator - https://mockaroo.com/
- Mobile Mockup Generator - https://mockuphone.com
- Logo Generator - https://www.logaster.com
- UUID Generator - https://www.uuidgenerator.net/
- Hash Generator - https://passwordsgenerator.net/sha256-hash-generator/
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
puppeteer-examples git:(master) ✗ URL="https://masalib.hatenablog.com/entry/2018/07/12/100000" node google_search_features.js | |
Trace started. | |
Navigating to https://masalib.hatenablog.com/entry/2018/07/12/100000 | |
Waiting for page to be idle... | |
Trace complete. | |
CAREFUL: using 130 HTML/JS, 126 CSS features. Some features are not supported by the Google Search crawler. | |
The bot runs Chrome 41, which may not render your page correctly when it's being indexed. | |
More info at https://developers.google.com/search/docs/guides/rendering. |
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 fs = require('fs'); | |
function csvdownload () { | |
try { | |
const puppeteer = require('puppeteer'); | |
(async () => { | |
const browser = await puppeteer.launch({headless: false}); | |
browser.on('targetcreated', async (target) => { | |
let s = target.url(); | |
//初期に開くabout:blankは無視する | |
if (s == 'about:blank') { |
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
<details><summary>クリックすると展開されます</summary> | |
``` | |
const puppeteer = require('puppeteer'); | |
puppeteer.launch().then(async browser => { | |
const page = await browser.newPage(); | |
await page.setViewport({ width: 1280, height: 800 }) | |
await page.goto('https://www.aymen-loukil.com'); | |
await browser.close(); | |
}); | |
``` |
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
if ('serviceWorker' in navigator){ | |
console.log('Service Worker is supported'); | |
} |
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
if ('serviceWorker' in navigator){ | |
//console.log('Service Worker is supported'); | |
window.addEventListener('load',() =>{ | |
navigator.serviceWorker | |
.register('../sw.js') | |
.then(reg => console.log('Service Worker: インストール完了(registed)')) | |
.catch(err => console.log(`Service Worker: インストール失敗(${err})`)); | |
}) | |
} |
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
self.addEventListener('install',e => { | |
console.log('Service Worker: sw.js is Installed'); | |
}); |
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
// インストールイベント | |
self.addEventListener('install',e => { | |
console.log('Service Worker: sw.js is Installed'); | |
}); | |
// アクティブイベント | |
self.addEventListener('activate',e => { | |
console.log('Service Worker: sw.js is Activater '); | |
}); |
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 cacheName = 'v1'; | |
const cacheAssets = [ | |
'index.html' | |
,'about-me.html' | |
,'/css/global.css' | |
,'/js/attach-nav.js' | |
,'/js/debounce.js' | |
,'/js/nav.js' | |
]; |
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 cacheName = 'v1'; | |
const cacheAssets = [ | |
'index.html' | |
,'about-me.html' | |
,'/css/global.css' | |
,'/js/attach-nav.js' | |
,'/js/debounce.js' | |
,'/js/nav.js' | |
]; |
OlderNewer