Twitter Background Image

Allows you to use images as background for Twitter.

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Twitter Background Image
// @author       cass_per
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  Allows you to use images as background for Twitter.
// @match        *twitter.com/*
// @license      MIT
// ==/UserScript==

// Replace the https:// url with any image URL
// This URL *MUST* be inside the single qoutes! Do not remove ''.

document.body.style.backgroundImage = "url('https://www.gardeningknowhow.com/wp-content/uploads/2020/12/lonely-japanese-cherry.jpg')";

// Keeps the background image fixed while you scroll. If you delete this the image will stay at the top of the page.
// https://www.w3schools.com/jsref/prop_style_backgroundattachment.asp
document.body.style.backgroundAttachment = "fixed";

// If you want background image to repeat:
// https://www.w3schools.com/jsref/prop_style_backgroundrepeat.asp
document.body.style.backgroundRepeat = "no-repeat";

// If you want to change image sizing/style:
// https://www.w3schools.com/jsref/prop_style_backgroundsize.asp
document.body.style.backgroundSize = "100%";