User:Cacycle/wikEd dev.js: Difference between revisions

Content deleted Content added
0.9.91h (July 20, 2010)
0.9.91i (July 21, 2010)
Line 2:
 
// version info
window.wikEdProgramVersion = window.wikEdProgramVersion || '0.9.91h91i';
window.wikEdProgramDate = window.wikEdProgramDate || 'July 2021, 2010';
 
/*
Line 492:
 
// frame
'.wikEdFrameHtml': 'height: 100%; width: 100%; padding: 0; margin: 0; background-color: transparent; background-image: url({wikEdImage:resizeGrip}); background-attachment: fixed; background-position: right bottom; background-repeat: no-repeat;',
'.wikEdFrameBodyPlain': 'height: auto; min-height: 100%; width: auto; background-color: transparent; margin: 0; padding: 0; padding-left: 0.25em; overflow: auto; font-family: monospace;',
 
'.wikEdFrameBodySyntax': 'height: auto; min-height: 100%; width: auto; background-color: transparent; margin: 0; padding: 0; padding-left: 0.25em; overflow: auto; font-family: monospace;',
'.wikEdFrameBodyNewbiewikEdFrameBodySyntax': 'height: auto; min-height: 100%; width: auto; background-color: transparent; margin: 0; padding: 0; padding-left: 0.25em; overflow: auto; font-family: monospace; text-shadow: white -1px -1px 0, white 1px 1px 0, white -1px 1px 0, white 1px -1px 0;',
 
'.wikEdFrameBodySyntaxwikEdFrameBodyNewbie': 'height: auto; min-height: 100%; width: auto; background-color: transparent; margin: 0; padding: 0; padding-left: 0.25em; overflow: auto; font-family: monospace;',
 
// reselection / scroll to selection
Line 503 ⟶ 505:
 
// syntax highlighting
'.wikEdError': 'background-image: url({wikEdImage:unknown}); color: black; font-weight: normal; font-style: normal; text-decoration: none; text-shadow: white -1px -1px 0, white 1px 1px 0, white -1px 1px 0, white 1px -1px 0;',
'.wikEdHighlightError': 'color: black; background-color: #faa;',
 
'.wikEdHtml': 'background-color: #e8e8e8; text-shadow: none;',
'.wikEdHtmlTag': 'color: #777;',
'.wikEdHtmlTagButtons': 'color: #777;',
'.wikEdHtmlUnknown': 'background-image: url({wikEdImage:unknown}); color: black; font-weight: normal; font-style: normal; text-shadow: white -1px -1px 0, white 1px 1px 0, white -1px 1px 0, white 1px -1px 0;',
'.wikEdParsingNote': 'border: 1px outset #fcc; padding: 0 0.5em 0 0.5em; margin: 0 0.25em 0 0.25em; color: black; background-color: #fcc; text-shadow: none; font-weight: normal; font-size: smaller; font-style: normal; text-decoration: none; font-family: sans-serif;',
 
'.wikEdSubscript': 'position: relative; top: 0.3em;',
Line 517 ⟶ 519:
'.wikEdItalic': 'font-style: italic;',
 
'.wikEdComment': 'background-color: #fff0d0; text-shadow: none; color: black; font-weight: normal; font-style: normal; text-decoration: none;',
'.wikEdDel': 'text-decoration: line-through;',
'.wikEdIns': 'text-decoration: underline;',
 
'.wikEdPre': 'background-color: #e8e8e8; text-shadow: none;',
'.wikEdMath': 'background-color: #e8e8e8; text-shadow: none;',
'.wikEdNowiki': 'background-color: #e8e8e8; text-shadow: none;',
 
// horizontal rule
'.wikEdHr': 'background-color: #666; text-shadow: none; color: #ffffff;',
 
// wiki code
Line 532 ⟶ 534:
'.wikEdRedir': 'color: #c00; font-weight: bold;',
'.wikEdSignature': 'color: #f00; font-weight: bold;',
'.wikEdMagic': 'color: #666; font-weight: bold; background-color: #e8e8e8; text-shadow: none;',
'.wikEdParserFunct': 'color: #f00;',
 
// headings
'.wikEdFrameBodySyntax .wikEdHeading': 'color: #000; font-weight: bold;',
'.wikEdFrameBodySyntax .wikEdHeadingWP': 'color: #000; font-weight: bold; background-color: #e8e8e8; text-shadow: none;',
'.wikEdFrameBodyNewbie .wikEdHeading':
'color: #000; font-weight: bold; color: #000; background: #eee; padding: 0 0.25em; border: 1px solid #aaaddd; font-size: larger; line-height: 1.5; text-shadow: white -1px -1px 0; ',
'.wikEdFrameBodyNewbie .wikEdHeadingWP':
'color: #000; font-weight: bold; color: #000; background: #ddd; padding: 0 0.25em; border: 1px solid #000ccc; font-size: larger; line-height: 1.5; text-shadow: #eee -1px -1px 0; ',
 
// tables
'.wikEdTable': 'color: #000; background-color: #e8e8e8; text-shadow: none;',
'.wikEdTableTag': 'color: #777;',
 
// list
'.wikEdList': 'color: #000; background-color: #e8e8e8; text-shadow: none;',
'.wikEdListTag': 'font-weight: bold; font-family: monospace; vertical-align: text-bottom;',
 
// space-pre
'.wikEdSpace': 'color: #000; background-color: #e8e8e8; text-shadow: none;',
'.wikEdSpaceTag': 'background-color: #e8e8e8; text-shadow: none;',
 
// links
Line 560 ⟶ 562:
// wiki links
'.wikEdLink': '',
'.wikEdLinkCrossNs': 'background-color: #ddd; text-shadow: none;',
'.wikEdLinkInter': 'color: #000; background-color: #ddd; text-shadow: none;',
'.wikEdLinkNs': 'color: #000; background-color: #ddd; text-shadow: none;',
'.wikEdLinkName': 'color: #00e; font-weight: bold;',
'.wikEdLinkTarget': 'color: #00e;',
Line 583 ⟶ 585:
 
// images
'.wikEdFile': 'background-color: rgb(213, 255, 176); background-color: rgba(199, 255, 149, 0.75); text-shadow: none;',
'.wikEdFrameBodyNewbie .wikEdFile':
'background-color: rgb(213, 255, 176); padding: 0.25em; margin-right: 0.25em; display: inline-block; border: 1px solid #082; margin: 1px;',
'.wikEdFileTag': 'color: #444;',
'.wikEdFileName': 'color: #00e;',
'.wikEdFileParam': 'color: #666;',
'.wikEdFileCaption': 'color: #000;',
'.wikEdFilePreview': 'border: 1px solid #c0ffa0; background: rgb(192, 192, 192) no-repeat 50% 50%; background-color: rgba(192, 192, 192, 0.75); text-shadow: none; position: absolute; right: 0; margin: 0.1em 0.25em; z-index: -1; border: none; padding: 1px; display: block;',
'.wikEdFrameBodyNewbie .wikEdFilePreview':
'position: static; float: right; clear: both; background-color: transparent; padding: 0; ',
 
// categories
'.wikEdCat': 'background-color: #ccc; text-shadow: none;',
'.wikEdCatName': 'color: #00e;',
'.wikEdCat .wikEdLinkInter': 'color: #000; background-color: #aaa; text-shadow: none;',
'.wikEdCat .wikEdLinkNs': 'color: #000; background-color: #ccc; text-shadow: none;',
'.wikEdCat .wikEdLinkText': 'color: #000; font-weight: normal;',
'.wikEdCat span.wikEdLinkText:hover': 'text-decoration: none;',
Line 608 ⟶ 610:
'.wikEdRefContainer button': 'padding: 0.1em; position: relative; top: -1em;',
 
'.wikEdRefButton': 'border: 1px solid; border-color: #e8e8e8 #444 #444 #e8e8e8; background: #d8d4d0; text-shadow: none;',
'.wikEdRefButtonShow': 'border: 1px solid; border-color: #000 #e8e8e8 #e8e8e8 #000; background: #c8c4c0; text-shadow: none;',
'.wikEdRef, .wikEdRefShow': 'background-color: #e8e8e8; text-shadow: none; color: #666;',
 
'.wikEdReferences': 'background-color: #eee; text-shadow: none;',
'.wikEdReferencesTag': 'color: #444;',
'.wikEdFrameBodyNewbie .wikEdReferences':
'background-color: #eee; padding: 0.25em; display: inline-block; border: 1px solid black; vertical-align: middle;',
'.wikEdRefList': 'background-color: #eee; text-shadow: none;',
'.wikEdFrameBodyNewbie .wikEdRefList':
'background-color: #e8e8e8; padding: 0.25em; display: inline-block; border: 1px solid black; vertical-align: middle;',
'.wikEdRefName': 'color: #000;',
 
Line 625 ⟶ 627:
'.wikEdTemplContainer': 'position: relative; top: 1em;',
'.wikEdTemplContainer button': 'padding: 0.1em; position: relative; top: -1em;',
'.wikEdTemplButton': 'border: 1px solid; border-color: #e8e8e8 #444 #444 #e8e8e8; background: #d8d4d0; text-shadow: none;',
'.wikEdTemplButtonShow': 'border: 1px solid; border-color: #000 #e8e8e8 #e8e8e8 #000; background: #c8c4c0; text-shadow: none;',
 
'.wikEdTempl, .wikEdTemplShow': 'background-color: #e8e8e8; text-shadow: none; color: #666;',
'.wikEdTemplNs, .wikEdTemplNsShow': 'background-color: #ccc; text-shadow: none;',
 
'.wikEdTemplTag': 'color: #777;',
Line 636 ⟶ 638:
'.wikEdTemplMod': 'color: #f00; font-weight: bold;',
 
'.wikEdParam': 'background-color: #e8e8e8; text-shadow: none;',
'.wikEdParamName': 'color: #900;',
'.wikEdParamDefault': 'color: #000;',
Line 649 ⟶ 651:
 
'.wikEdCharEntityButton':
'border: 1px solid; border-color: #e8e8e8 #444 #444 #e8e8e8; background: #d8d4d0; border-color: rgba(255, 255, 255, 0.75) rgba(64, 64, 64, 0.5) rgba(64, 64, 64, 0.5) rgba(255, 255, 255, 0.75); background: rgba(192, 192, 192, 0.3); text-shadow: none;',
 
'.wikEdCharEntityButtonShow':
'border: 1px solid; border-color: #000 #e8e8e8 #e8e8e8 #000; background: #c8c4c0; border-color: rgba(64, 64, 64, 0.5) rgba(255, 255, 255, 0.75) rgba(255, 255, 255, 0.75) rgba(64, 64, 64, 0.5); background: rgba(192, 192, 192, 0.3); text-shadow: none;',
 
'.wikEdCharEntity, .wikEdCharEntityShow':
'color: #000; background-color: #e8e8e8; text-shadow: none;',
 
// links in references and templates
Line 663 ⟶ 665:
// wikEdFrameBodyNewbie ref and template hiding
'.wikEdFrameBodyNewbie .wikEdRefContainer + .wikEdRef, .wikEdFrameBodyNewbie .wikEdTemplContainer + .wikEdTempl, .wikEdFrameBodyNewbie .wikEdTemplContainer .wikEdTemplNs, .wikEdFrameBodyNewbie wikEdRefContainer + .wikEdRefShow, .wikEdFrameBodyNewbie .wikEdTemplContainer + .wikEdTemplShow, .wikEdFrameBodyNewbie .wikEdTemplContainer + .wikEdTemplNsShow':
'display: none; color: #000; background-color: #f8f8f8; font-weight: normal; border: 1px solid; border-color: #444 #ccc #ccc #444; padding: 1em 0.25em 1em 0.25em; position: relative;',
 
 
'.wikEdFrameBodyNewbie .wikEdRefButton:before, .wikEdFrameBodyNewbie .wikEdTemplButton:before, .wikEdFrameBodyNewbie .wikEdRefButtonShow:before, .wikEdFrameBodyNewbie .wikEdTemplButtonShow:before':
Line 679 ⟶ 680:
 
'.wikEdFrameBodyNewbie .wikEdCharEntity, .wikEdFrameBodyNewbie .wikEdCharEntityShow':
'display: none; color: #000; border: 1px solid; border-color: #444 #ccc #ccc #444; background-color: #f8f8f8; border-color: rgba(64, 64, 64, 0.5) rgba(255, 255, 255, 0.75) rgba(255, 255, 255, 0.75) rgba(64, 64, 64, 0.5); background: rgba(192, 192, 192, 0.3); font-weight: normal;position: relative;',
 
'.wikEdFrameBodyNewbie .wikEdTemplButton:before, .wikEdFrameBodyNewbie .wikEdTemplButtonShow:before':
Line 685 ⟶ 686:
 
// table edit
'.wikEdTableEdit': 'border: solid black; border-width: 1px 1px 0 0; background-color: red; text-shadow: none; background-image: url({wikEdImage:tableBG}); border-collapse: separate; border-spacing: 0;',
'.wikEdTableEdit td': 'border: solid black; border-width: 0 0 1px 1px; background-color: white; text-shadow: none;',
'.wikEdTableEdit th': 'border: solid black; border-width: 0 0 1px 1px; background-color: lightgrey; text-shadow: none; font-weight: bold;',
'.wikEdTableEdit tr': 'background-color: lightgrey; text-shadow: none; font-weight: bold;',
'.wikEdTableEdit caption': 'background-color: lightgrey; text-shadow: none; font-weight: normal;',////
 
// insert wikicode here
'.wikEdInsertHere': 'background-color: orange; text-shadow: none; font-style: italic;',
 
// colors
'.wikEdColorsLight': 'color: black; text-shadow: none;',
'.wikEdColorsDark': 'color: white; text-shadow: none;',
 
// dashes
Line 806 ⟶ 807:
// preview box
'.wikEdPreviewBoxOuter': 'clear: both; margin: 0; border-width: 1px; border-style: solid; border-color: #808080 #d0d0d0 #d0d0d0 #808080;',
'.wikEdPreviewBox': 'background-color: #faf8f6; padding: 5px; border-width: 1px; border-style: solid; border-color: #404040 #ffffff #ffffff #404040;',
'.wikEdPreviewRefs': 'margin-top: 1.5em; padding-top: 1em;border-top: 1px solid #a0a0a0;',
 
Line 829 ⟶ 830:
// frame (frame container border will be removed if textarea has none; frame must not have a border)
'.wikEdFrameOuter': 'float: left; width: auto; border: 1px solid; border-color: #808080 #d0d0d0 #d0d0d0 #808080;',
'.wikEdFrameInner': 'float: left; width: auto; background-color: white; border: 1px solid; border-color: #404040 #ffffff #ffffff #404040;',
'.wikEdFrame': 'border: 0;',
 
Line 12,240 ⟶ 12,241:
break;
case 'colorLight':
insertLeft = '<span style="background-color: ' + tagMatch + '" class="wikEdColorsLight">';
insertRight = '</span><!--wikEdColorsLight-->';
break;
case 'colorDark':
insertLeft = '<span style="background-color: ' + tagMatch + '" class="wikEdColorsDark">';
insertRight = '</span><!--wikEdColorsDark-->';
break;
Line 12,254 ⟶ 12,255:
var luminance = parseInt(regExpMatch[1], 16) * 16 * 0.299 + parseInt(regExpMatch[2], 16) * 16 * 0.587 + parseInt(regExpMatch[3], 16) * 16 * 0.114;
if (luminance > 128) {
insertLeft = '<span style="background-color: ' + tagMatch + '" class="wikEdColorsLight">';
insertRight = '</span><!--wikEdColorsLight-->';
}
else {
insertLeft = '<span style="background-color: ' + tagMatch + '" class="wikEdColorsDark">';
insertRight = '</span><!--wikEdColorsDark-->';
}
Line 12,269 ⟶ 12,270:
var luminance = parseInt(regExpMatch[1], 16) * 0.299 + parseInt(regExpMatch[2], 16) * 0.587 + parseInt(regExpMatch[3], 16) * 0.114;
if (luminance > 128) {
insertLeft = '<span style="background-color: ' + tagMatch + '" class="wikEdColorsLight">';
insertRight = '</span><!--wikEdColorsLight-->';
}
else {
insertLeft = '<span style="background-color: ' + tagMatch + '" class="wikEdColorsDark">';
insertRight = '</span><!--wikEdColorsDark-->';
}
Line 12,284 ⟶ 12,285:
var luminance = regExpMatch[1] * 0.299 + regExpMatch[2] * 0.587 + regExpMatch[3] * 0.114;
if (luminance > 128) {
insertLeft = '<span style="background-color: ' + tagMatch + '" class="wikEdColorsLight">';
insertRight = '</span><!--wikEdColorsLight-->';
}
else {
insertLeft = '<span style="background-color: ' + tagMatch + '" class="wikEdColorsDark">';
insertRight = '</span><!--wikEdColorsDark-->';
}