Wie kann man f80980 die Text Farbe in für die Eingabebox in "f80980" ändern?
Code
// phpBB Quick Reply user script
// version 0.6
// 2006-03-15
// Copyright (c) 2005-6, xamm
// Released under the GPL license
// http://www.gnu.org/copyleft/gpl.html
//
// --------------------------------------------------------------------
//
// This is a Greasemonkey user script. To install it, you need
// Greasemonkey 0.3 or later: http://greasemonkey.mozdev.org/
// Then restart Firefox and revisit this script.
// Under Tools, there will be a new menu item to "Install User Script".
// Accept the default configuration and install.
//
// To uninstall, go to Tools/Manage User Scripts,
// select "phpBB Quick Reply", and click Uninstall.
//
// --------------------------------------------------------------------
//
// ChangeLog
// 2006-03-15 - 0.6 - Completly rewritten from scratch
// + moved the location of the quick reply box
// + shortened the delay between the posting and the post appearing
// + fixed it so it works with different themes
// + fixed the issue with non standard characters which i though i'd fixed
// + fixed the issue with it unsubscribing you to a topic you'd subscribed to
// 2005-12-19 - 0.5 - Altered the way the reply is submitted to a style like vBulletin's
// 2005-09-04 - 0.4 - Fixed duplication bug
// 2005-08-30 - 0.3 - Added check to see if user is logged in and centered form
// 2005-08-29 - 0.2 - Fixed topic number retrieval bug
// 2005-08-29 - 0.1 - Initial release
//
// --------------------------------------------------------------------
//
// ==UserScript==
// @name phpBB Quick Reply
// @namespace http://www.otsegolectric.com/greasemonkey/
// @description A fairly basic quick reply function that should work for all phpBB forums with the standard theme installed
// @include */viewtopic.php*
// ==/UserScript==
function encodeFormData(formData){
var encodedData = '';
var t;
for(i = 0; i < formData.length; i++){
t = '' + formData.charCodeAt(i).toString(16).toUpperCase();
if(t.length == 1)
encodedData += "%0" + formData.charCodeAt(i).toString(16).toUpperCase();
else
encodedData += "%" + formData.charCodeAt(i).toString(16).toUpperCase();
}
return encodedData;
}
var submitPost = function(event){
var replyHREF = event.target.getAttribute('replyHREF').split('?')[0];
var formData = event.target.getAttribute('formData');
var postContents = encodeFormData(event.target.previousSibling.previousSibling.value);
event.target.value = 'Submitting...'
GM_xmlhttpRequest({
method: 'POST',
url: replyHREF,
data: formData + 'message=' + postContents,
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
onload: function(responseDetails) {
var gotoPost = document.createElement('div');
gotoPost.innerHTML = responseDetails.responseText;
var allAs = gotoPost.getElementsByTagName('a');
for (var i = 0; i <allAs> 0)
location.location = allAs[i].href;
window.location.reload(false);
}
});
};
var replyHREF = document.evaluate("//a[contains(@href, 'posting.php?mode=reply')]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
if(replyHREF.snapshotLength != 0)
replyHREF = replyHREF.snapshotItem(0);
//generally the last one is the proper one
var mainTable = document.evaluate('//table[@class="forumline"]/tbody', document, null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE , null);
if(mainTable.snapshotLength != 0)
mainTable = mainTable.snapshotItem(mainTable.snapshotLength - 1);
//create the table row for everything to sit in
var qrTableRow = document.createElement('tr');
qrTableRow.align = 'center';
//create the cell for the quick reply stuff
var qrTableDivision = document.createElement('td');
qrTableDivision.className = 'catBottom';
qrTableDivision.style.backgroundImage = 'none!important';
qrTableDivision.style.width = '100%';
qrTableDivision.colSpan = '2';
//create the text area
var qrTextArea = document.createElement('textarea');
qrTextArea.style.width = '80%';
qrTextArea.style.height = '150px';
qrTextArea.style.border = '1px solid #000000';
qrTextArea.style.paddingLeft = '2px';
qrTextArea.style.paddingBottom = '2px';
//create a submit button
var qrSubmit = document.createElement('input');
qrSubmit.type = 'button';
qrSubmit.name = 'post';
qrSubmit.className = 'mainoption';
qrSubmit.value = 'Quick Reply';
qrSubmit.style.border = '1px solid #000000';
qrSubmit.addEventListener('click', submitPost, true);
qrSubmit.setAttribute('replyHREF', replyHREF);
//used to get the variables for the post otherwise we might unsubscribe people to topics
var qrIFrame = document.createElement("iframe");
qrIFrame.style.width = '1px';
qrIFrame.style.height = '1px';
qrIFrame.style.display = 'none';
qrIFrame.src = replyHREF;
qrIFrame.addEventListener('load',
function(){
var qrDoc = qrIFrame.contentDocument;
if(qrDoc.body.getElementsByTagName('textarea').length != 0){
qrDoc = qrDoc.getElementsByTagName('input');
var formData = '';
for(var i = 0; i < qrDoc.length; i++)
if(qrDoc[i].name.indexOf('addbbcode') == -1 && qrDoc[i].name.indexOf('helpbox') == -1 && qrDoc[i].name != '')
if(qrDoc[i].type != 'checkbox' || qrDoc[i].checked != '')
formData += qrDoc[i].name + '=' + encodeFormData(qrDoc[i].value) + '&';
qrSubmit.setAttribute('formData', formData);
qrDoc = null;
qrTableDivision.appendChild(qrTextArea, qrTableDivision);
qrTableDivision.appendChild(document.createElement('br'), qrTableDivision);
qrTableDivision.appendChild(qrSubmit, qrTableDivision);
qrTableRow.appendChild(qrTableDivision, qrTableRow);
mainTable.appendChild(qrTableRow, mainTable);
} else {
qrTextArea = null;
qrSubmit = null;
qrTableDivision = null;
qrTableRow = null;
}
},
false);
document.body.appendChild(qrIFrame);
Alles anzeigen