NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Centered Img // @version 1.3.2011 // @description Centered Img // @include http://*.jpg // @include https://*.jpg // @include http://*.png // @include https://*.png // @include http://*.gif // @include https://*.gif // @include http://*.ico // @include https://*.ico // @include http://*.tif // @include https://*.tif // @include http://*.tiff // @include https://*.tiff // @include http://*.bmp // @include https://*bmp // @include http://*.pict // @include https://*.pict // @include http://*.pct // @include https://*.pct // ==/UserScript== function addGlobalStyle(css) { var body, style; body = document.getElementsByTagName('body')[0]; if (!body) { return; } style = document.createElement('style'); style.type = 'text/css'; style.innerHTML = css; body.appendChild(style); } addGlobalStyle('body { background-color: #f6f6f6; display:-ms-flexbox; -ms-flex-pack:center; -ms-flex-align:center; display:-moz-box; -moz-box-pack:center; -moz-box-align:center; display:-webkit-box; -webkit-box-pack:center; -webkit-box-align:center; display:box; box-pack:center; box-align:center; } img { background-color:#e9e9e9; box-shadow: 0 1px 5px #909090; }');