A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$ if your browser aliases it:
~ 108 byte version
| request({ | |
| url: 'website url', | |
| //禁止使用預設編碼 | |
| encoding: null | |
| }, (error, response, body) => { | |
| //body: 爬回來的網站 | |
| if(body){ | |
| } | |
| }); |
| array = (new Array(5000)).fill(1) | |
| task = array.map(item => { | |
| return fetch('http://localhost:5000/diandian-landing-payment/us-central1/api/test') | |
| }) | |
| duplicated = [] | |
| Promise | |
| .all(task) | |
| .then(result => result.map(item => item.json())) |
| { | |
| "short_name": "order drink", | |
| "name": "好想訂飲料", | |
| "description": "好想訂飲料 - 快找大家訂飲料吧!", | |
| "theme_color": "#FFFFFF", | |
| "background_color": "#FFFFFF", | |
| "display": "standalone", | |
| "orientation": "portrait", | |
| "icons": [ | |
| { |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta name="theme-color" content="#FFFFFF"> | |
| <!-- Manifest JSON File --> | |
| <link rel="manifest" href="/manifest.json"> | |
| <!-- Manifest JSON File --> | |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta name="theme-color" content="#FFFFFF"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <link rel="manifest" href="/manifest.json"> | |
| <link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png"> |
| if ('serviceWorker' in navigator) { | |
| navigator | |
| .serviceWorker | |
| .register('/sw.js') | |
| } |
| [ | |
| 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css', | |
| 'https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js', | |
| 'https://unpkg.com/[email protected]/dist/vue-router.js', | |
| 'https://code.jquery.com/jquery-3.2.1.slim.min.js', | |
| 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js', | |
| 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js', | |
| '/app.js', | |
| '/manifest.json', | |
| '/' |
| const APP_ASSETS_CACHE_NAME = `app-assets-cache-v0.0.1` | |
| self.addEventListener('install', event => { | |
| console.log('[Service Worker] - install event') | |
| event.waitUntil( | |
| self | |
| .caches | |
| .open(APP_ASSETS_CACHE_NAME) | |
| .then(cache => { |
| navigator | |
| .serviceWorker | |
| .register('/sw.js', { | |
| scope: '/app' | |
| }) |