Moin,
die “richtigen” Farben dürften wohl vom eigenen Geschmack und der persönlich präferierten IDE abhängen. Bei mir sieht das Forum z.B. so aus (willkürlicher Screenshot):
Wer es ausprobieren will:
[spoiler]Firefox + Greasemonkey und
// ==UserScript==
// @name CleanUp: Byte Welt
// @description CleanUp: Byte Welt
// @namespace http://forum.byte-welt.net/members/1500-Fancy
// @include /^https?://forum\.byte-welt\.(net|de)/*/
// @exclude /^https?://forum\.byte-welt\.(net|de)/blog*/
// @exclude /^https?://forum\.byte-welt\.(net|de)/entries/*/
// @grant none
// ==/UserScript==
/* --- clean style --- */
function modStyle(css) {
var head = document.getElementsByTagName('head')[0];
var style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}
modStyle('html, body { background: white; margin-top: -5px ! important; }');
modStyle('#header { min-height: 0px ! important; }');
modStyle('.isuser { position: relative; z-index: 5; margin-top: 15px; margin-right: 160px ! important; }');
modStyle('.nouser { position: relative; z-index: 5; margin-top: 10px; margin-right: 160px ! important; }');
modStyle('.after_content { clear: none ! important; }');
modStyle('.threadpagenav { margin-bottom: 20px; ! important; }');
modStyle('.signature { border-top: 0px; color: #d0d0d0! important; }');
modStyle('.forumrow, .sticky, .nonsticky, .alt { background: white ! important; }');
modStyle('.forumhead, .forumrow, .threadbit, .searchlisthead { box-Shadow: none ! important; }');
modStyle('.logo-image, .ad_global_header, .welcomelink, #notices, #pagetitle, .icon, .usertitle, .rank, .userinfo_extra, .postbit_reputation, .user_rep, .subforumdescription, #above_threadlist_controls, #thread_info, #forum_info_options, #showthread_navpopup, .blog, .seperator, .navlinks, #wgo, .footer, .below_body { display: none ! important; }');
modStyle('#below_searchresults { margin: -20px 0px ! important; }');
modStyle('.bbclean { border: 1px solid #e9e9e9; padding: 5px; !important; }');
modStyle('.postbody { background: white !important; }');
/* --- move postcontainer --- */
function move() {
var nodeList = document.querySelectorAll('.postcontainer');
for (var i = 0, length = nodeList.length; i < length; i++) {
var head = nodeList**.querySelectorAll('.posthead')[0];
var details = nodeList**.querySelectorAll('.postdetails')[0];
var foot = nodeList**.querySelectorAll('.postfoot')[0];
nodeList**.innerHTML = head.outerHTML + foot.outerHTML + details.outerHTML;
}
}
move();
/* --- remove GeSHi and inject the SyntaxHighlighter from Alex Gorbatchev --- */
function removeOlLi() {
var nodeList = document.querySelectorAll('.java');
for (var i = 0, length = nodeList.length; i < length; i++) {
var result = '';
if(nodeList**.getAttribute('mod') !== 'true') {
var node = nodeList**.getElementsByTagName('ol');
for (var j = 0, noteLength = node.length; j < noteLength; j++) {
var n = node[j].getElementsByTagName('li');
for (var k = 0, nLength = n.length; k < nLength; k++)
result += n[k].getElementsByTagName('div')[0].innerHTML + '
';
}
nodeList**.outerHTML = '<pre class="brush: java class-name: bbclean; toolbar: false;" style="display:none;" mod=true>' + result + '</pre>';
}
}
}
function removeSpanA() {
var nodeList = document.querySelectorAll('.java');
for (var i = 0, length = nodeList.length; i < length; i++) {
var node = nodeList**.getElementsByTagName('span');
while(node.length > 0) {
var t = document.createTextNode(node[0].textContent);
node[0].parentNode.replaceChild(t, node[0]);
node = nodeList**.getElementsByTagName('span');
}
node = nodeList**.getElementsByTagName('a');
while(node.length > 0) {
var t = document.createTextNode(node[0].textContent);
node[0].parentNode.replaceChild(t, node[0]);
node = nodeList**.getElementsByTagName('a');
}
nodeList**.parentNode.parentNode.outerHTML = nodeList**.outerHTML;
}
}
function injectSyntaxHighlighter() {
var shCoreCss = document.createElement("link");
shCoreCss.rel = "stylesheet";
shCoreCss.type = "text/css";
shCoreCss.href = "http://alexgorbatchev.com/pub/sh/current/styles/shCore.css";
var shThemeEclipseCss = document.createElement("link");
shThemeEclipseCss.rel = "stylesheet";
shThemeEclipseCss.type = "text/css";
shThemeEclipseCss.href = "http://alexgorbatchev.com/pub/sh/current/styles/shThemeEclipse.css";
var shCoreJs = document.createElement("script");
shCoreJs.type = "text/javascript";
shCoreJs.src = "http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js";
shCoreJs.setAttribute('onload','SyntaxHighlighter.all();');
var shBrushJavaJs = document.createElement("script");
shBrushJavaJs.type = "text/javascript";
shBrushJavaJs.src = "http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js";
var head = document.getElementsByTagName('head')[0];
head.appendChild(shCoreCss);
head.appendChild(shThemeEclipseCss);
head.appendChild(shCoreJs);
head.appendChild(shBrushJavaJs);
}
removeOlLi();
removeSpanA();
injectSyntaxHighlighter();
[/spoiler]
Viele Grüße
Fancy
Edit: Das mit dem @ im Code Bereich dürfte wohl auch nicht sein, eigentlich sollte da
“//(At)grant none” stehen, aber grant wird wohl als User erkannt.