// ==UserScript== // @name Facebook Mobile on Desktop // @namespace http://tampermonkey.net/ // @version 0.3 // @description Enhancments for FB mobile on Desktop! // @author https://github.com/ugjka/ // @match https://m.facebook.com/* // @grant none // ==/UserScript== (function () { 'use strict'; var body = document.getElementsByTagName("BODY")[0] body.style.width = "500px"; body.style.margin = "auto"; document.addEventListener("DOMNodeInserted", function () { var stories; var composer; var extra; try { stories = document.getElementById("story_bucket_viewer_content").childNodes[0]; } catch { } if (stories) { stories.style.width = "500px"; stories.style.margin = "auto"; }; try { composer = document.getElementById("composer-main-view-id") } catch { } if (composer) { composer.style.width = "500px"; composer.style.margin = "auto"; }; try { extra = document.getElementById("msite-pages-header-contents").nextSibling } catch { } if (extra) { extra.style.width = "500px"; extra.style.margin = "auto"; }; }); })();