edlea / desktopamp Goto Github PK
View Code? Open in Web Editor NEWSafari and Chrome extensions to load the AMP version of webpages if available
License: MIT License
Safari and Chrome extensions to load the AMP version of webpages if available
License: MIT License
Example URL (scroll to the bottom): http://www.buzzfeed.com/amphtml/ailbhemalone/things-i-wish-id-known-about-money-in-my-twenties
What is happening is the list on the bottom sets the following style: margin-right: 0.5rem which is overriding the margin: 0 auto. One hacky way to "fix" it is to set margin: 0 auto !important but I think the real right way to fix this is to create a container and hoist all the content of the body into the container and set the container's max width to 600px. That way any margins set by the original site will work correctly.
I'd like to us some of your code for my extension - what license are you under?
Applying the mobile CSS (600px, etc), while well-intended, breaks pages. Attached are some screen shots from Backchannel (which is published on Medium).
I feel that getting this right is any sort of universal way is unlikely, will cause regressions, and so the extension shouldn't do it. Thoughts? Thanks.
Can you add the github URL to the published CWS description?
so we need to read the <head>
and thus document_start won't work as a trigger.
but it feels like document_end is a bit too late.
One approach that might work
in document_start, set up a mutationobserver, observe the documentElement, and when it adds a node, see if its the head, then querySelector in that for our amp guy.
ideally that'd get things rolling faster than waiting for all of to finish.
a bit more complicated but probably worth it, wdyt?
on high resolution laptop screens, the AMP content is often small, it would be great if I could set e.g. BBC 150%, Reuters 140% etc.
Hi! Would be nice to have for comparison purposes.
I'm really digging this extension, as it cuts the load time on a lot of my favorite websites. My only wish is that it could be a little more configurable. For example, I really dislike Genius's AMP site and would love to blacklist it from redirecting to the AMP version. Similarly, I love how this extension cuts down the bloat on Huffington Post articles, but for some of the articles, this extension causes a redirection loop when you click on the articles on the left (the articles in the middle aren't effected, for whatever reason).
If there could be blacklisting support built in to this extension that turns off AMP redirection for specified sites via a regex, that would be fantastic.
Websites where the AMP page points to the exact same page my infinitely loop trying to fetch the AMP page.
The AMP toolbar's requests seem to be sending Accept: */*
instead of Accept: text/html
or similar in Chrome. Should this be more specific?
You're now back at Github instead of the Verge home page
Doesn't work on this websit
http://www.reuters.com/article/us-russia-telegram-regulator-idUSKBN19E0H4
In the source, there is this code
<link rel="amphtml" href="http://mobile.reuters.com/article/amp/idUSKBN19E0H4">
but the extension doesn't find that.
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.