Extend to twitter.com and always switch to mobile.twitter.com - dotfiles - leot's dotfiles
(HTM) hg clone https://bitbucket.org/iamleot/dotfiles
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) changeset 8c879c82a6ee7dad425a556a1d6a905713857814
(DIR) parent c3283bab87cd974d1c73ccf3e95d9129fcdf9a70
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Tue, 9 Oct 2018 14:24:40
Extend to twitter.com and always switch to mobile.twitter.com
Diffstat:
local/share/luakit/scripts/twitter.user.js | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff -r c3283bab87cd -r 8c879c82a6ee local/share/luakit/scripts/twitter.user.js
--- a/local/share/luakit/scripts/twitter.user.js Tue Oct 09 05:46:58 2018 +0200
+++ b/local/share/luakit/scripts/twitter.user.js Tue Oct 09 14:24:40 2018 +0200
@@ -1,9 +1,14 @@
// ==UserScript==
// @name twitter
// @description Adjust and clean up timeline of Mobile Twitter
+// @include http*://twitter.com/*
// @include http*://mobile.twitter.com/*
// ==/UserScript==
+if (window.location.href.search('://twitter.com/') != -1) {
+ window.location.href = window.location.href.replace('://twitter.com/', '://mobile.twitter.com/');
+}
+
["#brand_bar", ".toast", "#footer"].forEach(function(c) {
document.querySelectorAll(c).forEach(function(e) {
e.remove();