/* generated javascript */
var skin = 'narratologen';
var stylepath = '/lhn/skins';
/* MediaWiki:Common.js */
/* Das folgende JavaScript wird für alle Benutzer geladen. */
function ModifySidebar( action , section , name , link ) {
try {
switch ( section ) {
case "languages":
var target = "p-lang";
break;
case "toolbox":
var target = "p-tb";
break;
case "navigation":
var target = "p-navigation";
break;
default:
var target = section;
break;
}
if ( action == "add" ) {
var node = document.getElementById( target )
.getElementsByTagName( 'ul' )[0];
var aNode = document.createElement( 'a' );
var liNode = document.createElement( 'li' );
aNode.appendChild( document.createTextNode( name ) );
aNode.setAttribute( 'href' , link );
liNode.appendChild( aNode );
liNode.className = 'plainlinks';
node.appendChild( liNode );
}
} catch( e ) {
return;
}
}
function CustomizeModificationsOfSidebarUser() {
ModifySidebar("add", "Fussleiste", "help", "/lhn/index.php/Help");
ModifySidebar("add", "Fussleiste", "export", "/lhn/index.php/Special:Export");
}
function CustomizeModificationsOfSidebarBureaucrat() {
ModifySidebar("add", "Fussleiste", "editors", "/lhn/index.php/NWUsers:Editors");
ModifySidebar("add", "Fussleiste", "authors", "/lhn/index.php/NWUsers:Authors");
ModifySidebar("add", "Fussleiste", "users", "/lhn/index.php/Special:ListUsers");
ModifySidebar("add", "Fussleiste", "block users", "/lhn/index.php/Special:Block");
ModifySidebar("add", "Fussleiste", "confirm accounts", "/lhn/index.php/Special:ConfirmAccounts");
}
Array.prototype.Contains = function(element,strict) {
for(i in this) {
if ( this[i] === element || this[i] == element && !strict ) {
return true;
}
}
return false;
}
function isObject( obj ) {
return ( typeof obj == "object" && obj != null );
}
function isArray( obj ) {
return ( isObject( obj ) && obj.constructor.toString().indexOf( "Array" ) != -1 );
}
if ( false && isArray( wgUserGroups ) ) {
addOnloadHook( CustomizeModificationsOfSidebarUser );
}
if ( isArray( wgUserGroups ) && wgUserGroups.Contains( 'bureaucrat' ) ) {
addOnloadHook( CustomizeModificationsOfSidebarBureaucrat );
}
function customizeEditToolBar() {
mwEditButtons = new Array();
mwEditButtons[0] = {
"imageId": "mw-editbutton-bold",
"imageFile": "/lhn/skins/common/images/de/button_bold.png",
"speedTip": "Bold Text",
"tagOpen": "\'\'\'",
"tagClose": "\'\'\'",
"sampleText": "Bold Text"
};
mwEditButtons[1] = {
"imageId": "mw-editbutton-italic",
"imageFile": "/lhn/skins/common/images/de/button_italic.png",
"speedTip": "Italic Text",
"tagOpen": "\'\'",
"tagClose": "\'\'",
"sampleText": "Italic Text"
};
mwEditButtons[2] = {
"imageId": "mw-editbutton-underline",
"imageFile": "/lhn/skins/common/images/button_underline.png",
"speedTip": "Underline",
"tagOpen": "",
"tagClose": "",
"sampleText": "Underline"
};
mwEditButtons[3] = {
"imageId": "mw-editbutton-regular",
"imageFile": "/lhn/skins/common/images/de/button_regular.png",
"speedTip": "Regular Text",
"tagOpen": "",
"tagClose": "",
"sampleText": "Regular Text"
};
mwEditButtons[4] = {
"imageId": "mw-editbutton-hr",
"imageFile": "/lhn/skins/common/images/button_hr.png",
"speedTip": "Hyphen",
"tagOpen": "",
"tagClose": "",
"sampleText": ""
};
mwEditButtons[5] = {
"imageId": "",
"imageFile": "",
"speedTip": "",
"tagOpen": "",
"tagClose": "",
"sampleText": ""
};
mwEditButtons[6] = {
"imageId": "mw-editbutton-headline",
"imageFile": "/lhn/skins/common/images/button_headline.png",
"speedTip": "Level 1 Headline",
"tagOpen": "\n=== ",
"tagClose": " ===\n",
"sampleText": "Headline"
};
mwEditButtons[7] = {
"imageId": "mw-editbutton-headline2",
"imageFile": "/lhn/skins/common/images/button_headline2.png",
"speedTip": "Level 2 Headline",
"tagOpen": "\n==== ",
"tagClose": " ====\n",
"sampleText": "Headline"
};
mwEditButtons[8] = {
"imageId": "mw-editbutton-headline3",
"imageFile": "/lhn/skins/common/images/button_headline3.png",
"speedTip": "Level 3 Headline",
"tagOpen": "\n===== ",
"tagClose": " =====\n",
"sampleText": "Headline"
};
mwEditButtons[9] = {
"imageId": "mw-editbutton-headline4",
"imageFile": "/lhn/skins/common/images/button_headline4.png",
"speedTip": "Level 4 Headline",
"tagOpen": "\n====== ",
"tagClose": " ======\n",
"sampleText": "Headline"
};
mwEditButtons[10] = {
"imageId": "",
"imageFile": "",
"speedTip": "",
"tagOpen": "",
"tagClose": "",
"sampleText": ""
};
mwEditButtons[11] = {
"imageId": "mw-editbutton-link",
"imageFile": "/lhn/skins/common/images/button_link.png",
"speedTip": "Internal Link",
"tagOpen": "[[",
"tagClose": "]]",
"sampleText": "Link Text"
};
mwEditButtons[12] = {
"imageId": "mw-editbutton-arrow_right",
"imageFile": "/lhn/skins/common/images/button_arrow_right.png",
"speedTip": "Article Link",
"tagOpen": "\{\{\#artlink:",
"tagClose": "\}\}",
"sampleText": "Article Name"
};
mwEditButtons[13] = {
"imageId": "mw-editbutton-seealso",
"imageFile": "/lhn/skins/common/images/button_seealso.png",
"speedTip": "Bibliographic Link",
"tagOpen": "",
"tagClose": "",
"sampleText": "Bibliographic Details"
};
mwEditButtons[14] = {
"imageId": "mw-editbutton-extlink",
"imageFile": "/lhn/skins/common/images/button_extlink.png",
"speedTip": "External Link (Watch http://)",
"tagOpen": "[",
"tagClose": "]",
"sampleText": "http://www.example.com Link Text"
};
mwEditButtons[15] = {
"imageId": "",
"imageFile": "",
"speedTip": "",
"tagOpen": "",
"tagClose": "",
"sampleText": ""
};
mwEditButtons[16] = {
"imageId": "mw-editbutton-image",
"imageFile": "/lhn/skins/common/images/button_image.png",
"speedTip": "File Link",
"tagOpen": "[[File:",
"tagClose": "|link=]]",
"sampleText": "example.jpg"
};
mwEditButtons[17] = {
"imageId": "",
"imageFile": "",
"speedTip": "",
"tagOpen": "",
"tagClose": "",
"sampleText": ""
};
mwEditButtons[18] = {
"imageId": "mw-editbutton-signature",
"imageFile": "/lhn/skins/common/images/button_sig.png",
"speedTip": "Signature with Timestamp",
"tagOpen": "\n'''''(\~\~\~\~): '''''\n",
"tagClose": "",
"sampleText": ""
};
mwEditButtons[19] = {
"imageId": "",
"imageFile": "",
"speedTip": "",
"tagOpen": "",
"tagClose": "",
"sampleText": ""
};
mwEditButtons[20] = {
"imageId": "mw-editbutton-new",
"imageFile": "/lhn/skins/common/images/button_new.png",
"speedTip": "NEW: ",
"tagOpen": "\{\{\#new:",
"tagClose": "\}\}",
"sampleText": ""
};
}
addOnloadHook( customizeEditToolBar );
/* Open external links in a separate browser window */
externalLinks = function() {
if ( !document.getElementsByTagName ) {
return;
}
var anchors = document.getElementsByTagName( "a" );
for ( var i = 0 ; i < anchors.length ; i++ ) {
var anchor = anchors[i];
if ( anchor.getAttribute( "href" ) && anchor.getAttribute( "href" ).indexOf( "http" ) == 0 && anchor.getAttribute( "href" ) != "http://wikis.sub.uni-hamburg.de/lhn/index.html" && (!anchor.getAttribute( "href" ).indexOf( "Talk" )) ) {
anchor.target = "_blank";
}
}
}
if ( window.addEventListener ) {
window.addEventListener( "load" , externalLinks , false );
} else if ( window.attachEvent ) {
window.attachEvent( "onload" , externalLinks );
}
/* Write Edit-Prefixes */
writeEditPrefixes = function() {
try {
var textBox1 = document.getElementById( 'wpTextbox1' );
if ( wgNamespaceNumber == 0 && wgPageName == "LHN-Project" ) {
textBox1.value = textBox1.value+"\n'''''( \~\~\~\~ ): '''''\n";
} else if ( wgNamespaceNumber == 0 && textBox1.value == "" ) {
textBox1.value = "NWUsers:Editors,NWUsers:Authors\n[[Cate"+"gory:Article]]\n\'\'AUTHOR\'\'";
} else if ( wgNamespaceNumber == 1 ) {
textBox1.value = textBox1.value+"\n'''''( \~\~\~\~ ): '''''\n";
}
if ( textBox1.value.indexOf( "right column start" ) == -1 ) {
textBox1.value = textBox1.value+"\nright column start\nright column end\n";
}
} catch( e ) {
return;
}
}
function getReference() {
var refNode = document.getElementById( "reference" );
if ( ! refNode ) {
return;
}
var months = new Array( "Jan" , "Feb" , "Mar" , "Apr" , "May" , "Jun" , "Jul" , "Aug" , "Sep" , "Oct" , "Nov" , "Dec" );
var j = new Date();
var thisDay = ( j.getDate() < 10 ) ? "0"+j.getDate() : j.getDate();
var heute = thisDay+" "+months[j.getMonth()]+" "+j.getFullYear();
var refText1 = "Hühn, Peter: \"Event and Eventfulness\" , Paragraph 7-11. In: Hühn, Peter et al. (eds.): the living handbook of narratology. Hamburg: Hamburg University Press. ";
var refText2 = "[view date: "+heute+"]";
var linkText = "wikis.sub.uni-hamburg.de/lhn/index.php?title=Narratology&oldid=850";
var aNode = document.createElement( "a" );
var brNode1 = document.createElement( "br" );
var brNode2 = document.createElement( "br" );
var queryString = document.location.search.slice(1);
if ( queryString != "" ) {
var values = queryString.split( "&" );
if ( values[1] != "" ) {
var titleArray = values[1].split( "=" );
if ( titleArray[0] == "refTitle" ) {
var title = decodeURIComponent( titleArray[1] );
if ( values[2] != "" ) {
var revArray = values[2].split( "=" );
if ( revArray[0] == "refRevisionDate" ) {
var revdate = decodeURIComponent( revArray[1] );
if ( values[3] != "" ) {
var revidArray = values[3].split( "=" );
if ( revidArray[0] == "refRevisionId" ) {
var revid = decodeURIComponent( revidArray[1] );
if ( values[4] != "" ) {
var authorArray = values[4].split( "=" );
if ( authorArray[0] == "refAuthor" ) {
var author = decodeURIComponent( authorArray[1] );
if ( values[5] != "" ) {
var maxIdArray= values[5].split( "=" );
if ( maxIdArray[0] == "articleMaxId" ) {
var maxId = maxIdArray[1];
} else {
var maxId = 2;
}
}
refText1 = author+": \""+title +"\"., Paragraph 1-"+maxId+". In: Hühn, Peter et al. (eds.): the living handbook of narratology. Hamburg: Hamburg University Press.";
refText2 = "[view date: "+revdate+"]";
linkText = "hup.sub.uni-hamburg.de/lhn/index.php?title="+title+"&oldid="+revid;
}
}
}
}
}
}
}
}
}
aNode.appendChild( document.createTextNode( linkText ) );
aNode.setAttribute( "href" , "http://"+linkText );
refNode.appendChild( document.createTextNode( refText1 ) );
if ( linkText.length >= 84 ) {
refNode.appendChild( document.createTextNode( " URL = " ) );
}
refNode.appendChild( brNode1 );
if ( linkText.length < 84 ) {
refNode.appendChild( document.createTextNode( "URL = " ) );
}
refNode.appendChild( aNode );
refNode.appendChild( brNode2 );
refNode.appendChild( document.createTextNode( refText2 ) );
}
if ( window.addEventListener ) {
window.addEventListener( "load" , writeEditPrefixes , false );
window.addEventListener( "load" , getReference, false );
} else if ( window.attachEvent ) {
window.attachEvent( "onload" , writeEditPrefixes );
window.attachEvent( "onload" , getReference);
}
var firstParagraph = -1;
function getParagraph( paragraph ) {
firstParagraph = paragraph;
citeParagraph( paragraph );
}
function citeParagraph( paragraph ) {
var citeit = document.getElementById( "citePar" );
var parText = ", Paragraph "+paragraph;
if ( firstParagraph > 0 && firstParagraph < paragraph ) {
parText = ", Paragraph "+firstParagraph+"-"+paragraph;
}
if ( firstParagraph > paragraph ) {
parText = ", Paragraph "+paragraph+"-"+firstParagraph;
}
citeit.appendChild( document.createTextNode( "" ) );
citeit.firstChild.deleteData( 0 , citeit.firstChild.nodeValue.length );
citeit.firstChild.insertData( 0 , parText );
clearTimeout( colorShifts );
shiftColor();
}
var colors = new Array("#000000","#262B2E","#565B5E","#868B8E","#B6BBBE","#E6EBEE","#B6BBBE","#868B8E","#565B5E","#262B2E","#000000");
var color = 0;
var colorShifts = null;
function shiftColor() {
color = ( color + 1 );
if ( color < colors.length ) {
document.getElementById( "citeIt" ).style.color = colors[color];
document.getElementById( "citeItLink" ).style.color = colors[color];
colorShifts = setTimeout( "shiftColor()" , 200 );
} else {
color = 0;
}
}
/* MediaWiki:Narratologen.js */