惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hacker News - Newest:
Hacker News - Newest: "LLM"
Webroot Blog
Webroot Blog
S
Security @ Cisco Blogs
H
Heimdal Security Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
www.infosecurity-magazine.com
www.infosecurity-magazine.com
N
News and Events Feed by Topic
H
Hacker News: Front Page
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Application and Cybersecurity Blog
Application and Cybersecurity Blog
SecWiki News
SecWiki News
N
News | PayPal Newsroom
T
Tor Project blog
W
WeLiveSecurity
A
Arctic Wolf
Security Archives - TechRepublic
Security Archives - TechRepublic
S
Secure Thoughts
月光博客
月光博客
AWS News Blog
AWS News Blog
D
Docker
C
CERT Recently Published Vulnerability Notes
MyScale Blog
MyScale Blog
Google Online Security Blog
Google Online Security Blog
大猫的无限游戏
大猫的无限游戏
T
The Blog of Author Tim Ferriss
I
InfoQ
人人都是产品经理
人人都是产品经理
Recent Announcements
Recent Announcements
Google DeepMind News
Google DeepMind News
Hacker News: Ask HN
Hacker News: Ask HN
Blog — PlanetScale
Blog — PlanetScale
博客园 - 【当耐特】
Engineering at Meta
Engineering at Meta
Stack Overflow Blog
Stack Overflow Blog
Recorded Future
Recorded Future
罗磊的独立博客
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
T
The Exploit Database - CXSecurity.com
D
DataBreaches.Net
S
Security Affairs
WordPress大学
WordPress大学
T
Threatpost
Microsoft Security Blog
Microsoft Security Blog
V
Vulnerabilities – Threatpost
The Hacker News
The Hacker News
S
SegmentFault 最新的问题
B
Blog RSS Feed
Project Zero
Project Zero
P
Proofpoint News Feed

remy sharp's l:inks

Deno Style Guide Easy 6502 by skilldrick Profiling React.js Performance BEM Naming Cheat Sheet by 9elements Visual 6502 Remix Elijah Manor (@elijahmanor) on X All – Tiny Helpers AST explorer Insecure How to Authenticate with Next.js and Auth0: A Guide for Every Deployment Model Revealed: quarter of all tweets about climate crisis produced by bots I Add 3-25 Seconds of Latency to Every Page I Visit GitHub - ericchiang/pup: Parsing HTML at the command line Browserling – Online cross-browser testing Error Handling with GraphQL and Apollo Schwerkraftprojektionsgerät How To Turn Off Catalina Update Notifications (Prompts & Badges) • macReports Maskable.app It’s 2020 and you’re in the future Emulators written in JavaScript | Frederic Cambus The Size of Space systemfontstack JavaScript isn’t always available and it’s not the user’s fault Programming Fonts - Test Drive Screen Size Map GitHub - Yonet/MixedRealityResources: Mixed Reality related resources The Lines of Code That Changed Everything Notes from the Internet Health Report 2019 CopyPalette Generative Artistry Profile a React App for Performance nanoSQL 2 Moving Your JavaScript Development To Bash On Windows — Smashing Magazine Startup Playbook How to Release a Custom React Component, Hook or Effect as an npm Package React Suite - Enterprise React UI Component Library Use VSCode Dimmer to Highlight Code when Teaching 3 simple rules for effectively handling dates and timezones Large collection of how to animate pixelart Accessible React component libraries mineral-ui.com Australian Government Design System Reakit – Toolkit for building accessible UIs Chakra UI Curl Cookbook The problem with tooltips and what to do instead GitHub - trimstray/the-book-of-secret-knowledge: A collection of inspiring lists, manuals, cheatsheets, blogs, hacks, one-liners, cli/web tools and more. It Form design: from zero to hero all in one blog post Brussels changes its mind AGAIN on .EU domains: Euro citizens in post-Brexit Britain can keep them after all Improve Your Email Campaigns with These Fantastic Tools Ethical Web Principles Old Typewriter Text Effect Bruce Lawson Google open sources standardized code in bid to become Mr Robots.txt Preferreds-color-scheme:你好,黑暗,我的老朋友  |  Articles  |  web.dev Free for Developers Startup idea checklist Developing a Robust Font Loading Strategy for CSS-Tricks—zachleat.com How I use Slack—alone—to get more done Upcoming proposals in JavaScript 🦄 VueJS is dead, long live VueJS! Bruce Lawson Answers for young people - Tim Berners-Lee Finally, an AI that can reliably catch and undo Photoshop airbrushing. Who made it? Er, Photoshop maker Adobe Qubyte Codes - How I schedule posts using GitHub Actions Stack 58 bytes of css to look great nearly everywhere The reduce ({...spread}) anti-pattern - RichSnapp.com The Online Disassembler CSS Gradient – Generator, Maker, and Background Chrome DevTools  |  Chrome for Developers HB88 | Đăng Nhập HB88 Cá Cược Nhanh Chóng Không Bị Chăn #1 Introducing React Apollo 2.1 - Apollo GraphQL Blog Color Palettes Generator and Color Gradient Tool Clément Chastagnol ~ Moving efficiently in the CLI Testing Async Components · Issue #346 · enzymejs/enzyme Game Platforms recent news | Game Developer Professional Sound Effects - Royalty-Free SFX | Unlimited Downloads entr(1) Learn React From The Comfort Of Your Browser Axe Rules | Deque University Record and share your terminal sessions, the simple way Web Design Museum Powerful New Additions to the CSS Grid Inspector in Firefox Nightly – Mozilla Hacks - the Web developer blog Latency | Apex Software HackerNoon Signals and Sine Waves (Learn Web Audio from the Ground Up, Part 1) JavaScript Systems Music Vintage bits on cassettes Microsoft Design Legal Documents & Contract Templates | Simply Docs create-graphql-server — instantly scaffold a GraphQL server GraphQL and MongoDB — a quick example Using GraphQL with MongoDB Your First GraphQL Server Build a GraphQL server from scratch Practical Redux, Part 3: Project Planning and Setup 架构标记测试工具 | Google 搜索中心  |  Search Central  |  Google for Developers Freesound
Games and Graphics in Popup URL bars
2019-06-16 · via remy sharp's l:inks

by Matthew Rayfield on June 14th 2019

When I animated the URL bar with emojis I mentioned that I'd like to take it to the next level by putting a teeny game inside the URL bar. Well... Some really fine folks beat me to that. But I still wanted to give it a go ! I just needed to come up with something FRESH to work into it...

So while thinking about how I could expand beyond the 1-dimensional movement of a URL bar, it came to me... Popups ! Yes, the bane of early 2000s internet will help me in 2019 achieve my emoji-url-bar-gaming dreams. By just opening a series of popups and overlapping them in a column we create a 2-dimensional display of sorts:

NOTE: You'll need to disable popup blocking for any of the examples to work properly

Technical Challenges

Surprisingly, working with popups about a decade past their expiration date has some snags. Most frustratingly the focus() method appears to simply not work. Which means the last popup I open will receive all the keyboard events. Therefore it needs to be the page controlling the game logic. But because it's not the page that opened the popups it has no references to them and can't change their URLs...

This really threw me for a loop, and I tried all kinds of schemes, until I realized I could simply assign an array of popups over to the "controller popup" like this:

var popups = [],
    i;

// Open all me popups
for (i = 0; i < 7; i ++) {
    popups.push(window.open('popup.html', 'w'+i, 'width=100,height=100,left=0,top='+(i*100)));
}

// Give the "controller popup" all the popups
popups[popups.length-1].popups = popups;

// Start the game
popups[popups.length-1].setup();

Another pleasant technical detail that made this whole thing work was using:

popup.outerHeight - popup.innerHeight;

to find the vertical size of the browser's toolbar. With this I was able to figure out what size gap I needed to use when overlapping my popups. Nice !

Donkey Kong

No matter how I overlap the popups there will always be a nasty title bar in between each URL bar. Because of this I thought a game that took place on several vertical platforms might be nice and the Donkey Kong came to mind. It was also fun to recreate in emoji.

NOTE: On Windows the emoji are not fixed width, so they don't line up properly in any of these games... :[

Strangely sometimes an emoji in the URL bar will instead display as a non-emoji character. For example "White Medium Square" (◻️) if put into the URL will just show up as a square with a black outline (non-emoji style). But if you put a character before it that always shows up as an emoji then it will show its emoji version. It's odd and sometimes unpredictable. But the fix was simple, just border the left side of the game with "Large Orange Diamond" (🔶) emojis !

Breakout

While making the Donkey Kong "clone" I took a little break and made breakout:

It's almost fun if you ask me ! Though the ball does move a bit oddly at times.

Webcam ?

After two games I thought I'd try something different. In the past I've converted images into mosaics of emojis, and I thought perhaps I could do the same thing here.

So I wrote some code that found the average color of each emoji and sorted them into a 16x16x16 array. Each dimension of the array corresponding to the red, green, and blue values. Then with this I tried to render out a webcam's image into my popup display...

And... Well... The result is pretty bad. There just isn't enough resolution to tell what the heck is going on. Plus the gaps between each row of emojis doesn't help. But I saw some potential here.

The 3D Cube

Maybe my emoji-pixels would work if I showed an image that was only a few colors, and didn't require a high resolution to comprehend. So I whipped up a little 6 color 3D cube:

And hey, you can mostly tell what's going on... If you squint. So okay. One more thing then:

The 3D Room

"Doom ported to the url address bar" is the top comment on my animated URLs video. And okay... We're far away from anything resembling DOOM, but, I figured a tiny walkable 3D environment might be fun...

It's mostly navigable ! However the smiley face I put in the one corner is pretty much unrecognizable.

I'm Done

With that, I'm done. I feel that I have truly explored the possibilities of the stacked URL bar display system. And I've certainly reached a new realm of web uselessness. So, unless some brilliant new revelation comes to me about unchartered uses for this technology... I'm done with URL bar hackery for a while.

If you have questions, comments, or simply want to keep up with my latest tinkerings, check me out on Twitter: @MatthewRayfield. Or subscribe to my almost-never-bothered email list here.

Code for the above nonsense is available on GitHub here: https://github.com/MatthewRayfield/url-bar-games

Byeeeee !