Created
April 4, 2019 15:57
Revisions
-
nathggns created this gist
Apr 4, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ Twitter has started testing a new desktop website based on their mobile website that should be a faster experience. If you're not lucky enough to be included in this A/B test, you can "break" into it by setting the `rweb_optin` cookie to `on`. You can do that by pasting the following URL into your browser's address bar while you're logged-in on [https://twitter.com](https://twitter.com/). ``` javascript:document.cookie%3D'rweb_optin%3Don%3B%20expires%3D01%2F12%2F2019%3B%20path%3D%2F%3B'%3Bwindow.location.reload()%3B ``` ### Safari Safari might prevent you from pasting javascript into the URL bar. In which case, you need to enable that feature. Firstly, turn on developer mode in Safari's advanced preferences – "Show Develop menu in menu bar". Then, under the Develop menu, check "Allow JavaScript from Smart Search field". ### Security If you're concerned about pasting arbitrary javascript into your browser, that URL was produced by the following code ```javascript `javascript:${encodeURIComponent("document.cookie='rweb_optin=on; expires=01/12/2019; path=/;';window.location.reload();")}`; ``` And it simply runs the following javascript ```javascript document.cookie='rweb_optin=on; expires=01/12/2019; path=/;'; window.location.reload(); ```