GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — nullstack/client/page.js at master · GuiDevloper/nullstack Expand file tree/ Copy pathpage.jsMore file actions 38 lines (33 loc) · 1.35 KB / Copy pathpage.jsFile metadata and controls38 lines (33 loc) · 1.35 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 import client from './client' import state from './state' import windowEvent from './windowEvent' const page = { ...state.page, event: 'nullstack.page', } delete state.page const pageProxyHandler = { set(target, name, value, receiver) { const result = Reflect.set(target, name, value, receiver) if (name === 'title') { document.title = value document.querySelector('head > meta[property="og:title"]').setAttribute('content', value) windowEvent('page') } else if (name === 'description') { document.querySelector('head > meta[name="description"]').setAttribute('content', value) document.querySelector('head > meta[property="og:description"]').setAttribute('content', value) } else if (name === 'locale') { document.querySelector('html').setAttribute('lang', value) document.querySelector('head > meta[property="og:locale"]').setAttribute('content', value) } else if (name === 'image') { document.querySelector('head > meta[property="og:image"]').setAttribute('content', value) } else if (name === 'canonical') { canonical = (path.indexOf('//') === -1) ? router.base + value : value document.querySelector('head > link[rel="canonical"]').setAttribute('href', canonical) } client.update() return result }, } const proxy = new Proxy(page, pageProxyHandler) export default proxy |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |