📜 ⬆️ ⬇️

Alternative view of the page for opera speed dial

I have long been looking for a way to detect the Speed ​​Dial Detector from Opera, so that a special type of page is given to the Speed ​​Dial.
Through experiments, it was found that in the “Speed ​​Dial Screenshot” mode Opera sets hard values ​​for document.documentElement.clientHeight and document.documentElement.clientWidth to 768 and 1024, respectively, naturally if there is a body tag inside the document.

Here, in fact, the code that detects "opera speed dial mode":
var sd = document.documentElement.clientHeight == 768 && document.documentElement.clientWidth == 1024 && window.opera;

Test page dl.dropbox.com/u/2899751/opera-speed-dial/test.html
Source pastebin.com/msfc9aYj

Just add dl.dropbox.com/u/2899751/opera-speed-dial/test.html to one of the cells of the Opera Speed ​​Dial.
In normal mode, the “Common page” in Speed ​​Dial mode will be issued to wallpaper with android droidfreeapps.com/wp-content/uploads/2010/01/android_logo.gif

')

Source: https://habr.com/ru/post/103632/


All Articles