議論 » 作成依頼

Personalize about:blank page in Firefox

Deleted user 4161
§
投稿日: 2014/08/22

Personalize about:blank page in Firefox

I'd like to create a script to add a simple div in the about:blank page in Firefox, to add a loader like this: http://tobiasahlin.com/spinkit/

I'm not able to create scripts, only to modify them, so I ask if you can please create this simple one, basically I just need a div or two inside the body of about:blank in Firefox, then I could style it myself. Thanks.

§
投稿日: 2014/10/02

This should give you something to start with.

// ==UserScript==
// @name testAboutBlank
// @namespace YourNameSpace
// @include about:blank
// @version 1
// @grant GM_addStyle
// ==/UserScript==

// Styles
GM_addStyle('#myID{width:100px; margin:auto; background-color:aqua; text-align:center;}');
GM_addStyle('#container{width:100%;}');

var el = document.createElement('div');
el.id = "myID";
var elCont = document.createElement('div');
elCont.id = "container";
var h = document.createElement("H1")
var t = document.createTextNode("Hej!");
h.appendChild(t);
el.appendChild(h);
elCont.appendChild(el);
document.body.appendChild(elCont);

返信を投稿

返信を投稿するにはログインしてください。