מדיה ויקי:Gadget-TemplatesExternalLinks.js: הבדלים בין גרסאות בדף
עישוב |
הוספת מעריב, הצפירה, הצבי, המגיד, המליץ, חבצלת |
||
| שורה 66: | שורה 66: | ||
"הארץ": [1, 2, 3, 4], | "הארץ": [1, 2, 3, 4], | ||
"דבר": [1,2,22,3,7,23], | "דבר": [1,2,22,3,7,23], | ||
"מעריב": [1,2,22,3,7,23], | |||
"הצבי": [1,2,22,3,7,23], | |||
"הצפירה": [1,2,22,3,7,23], | |||
"המגיד": [1,2,22,3,7,23], | |||
"חבצלת": [1,2,22,3,7,23], | |||
"המליץ": [1,2,22,3,7,23], | |||
'תנ"ך': [8,9,10], | 'תנ"ך': [8,9,10], | ||
"nrg": [1,2,3,4,0,19,20], | "nrg": [1,2,3,4,0,19,20], | ||
| שורה 149: | שורה 155: | ||
"כלכליסט": {regex: /\/articles\/(\d+),7340,L-(\d+),00/i, params:[6,3]}, | "כלכליסט": {regex: /\/articles\/(\d+),7340,L-(\d+),00/i, params:[6,3]}, | ||
"נענע10": {regex: /http:\/\/([a-z]*)\.nana10\.co\.il\/Article\/\?ArticleID=(\d+)/i, params:[6,3]}, | "נענע10": {regex: /http:\/\/([a-z]*)\.nana10\.co\.il\/Article\/\?ArticleID=(\d+)/i, params:[6,3]}, | ||
"אנציקלופדיה ynet": {regex: /\/yaan\/0,7340,L-(\d+)-([^-]*)-FreeYaan,00.html/i, params:[2,3]}, | "אנציקלופדיה ynet": {regex: /\/yaan\/0,7340,L-(\d+)-([^-]*)-FreeYaan,00.html/i, params:[2,3]}, | ||
"אנשים ישראל": {regex: /.*itemID=(\d+)&/i, params:[3]}, | "אנשים ישראל": {regex: /.*itemID=(\d+)&/i, params:[3]}, | ||
| שורה 181: | שורה 186: | ||
"דעת": {regex: /(?:www\.)?daat\.ac\.il\/(.*)/i, params:[2], problematic:1}, | "דעת": {regex: /(?:www\.)?daat\.ac\.il\/(.*)/i, params:[2], problematic:1}, | ||
"פנאי פלוס": {regex: /ynet\.co\.il\/([^\/]+)\/(\d+),7340,L-(\d+),00\.html/i, params:[7,6,3]} | "פנאי פלוס": {regex: /ynet\.co\.il\/([^\/]+)\/(\d+),7340,L-(\d+),00\.html/i, params:[7,6,3]} | ||
} | |||
// these guys are all the same - it's best to handle them as such. | |||
var historic = {"דבר": "DAV", "מעריב": "MAR", "הצבי": "HZV", "הצפירה": "HZF", "המגיד": "MGD", "המליץ": "HMZ", "חבצלת": "HZT"}; | |||
var histregex = {regex: /=HISTNAME\/(\d{4}\/\d{1,2}\/\d{1,2})(?:.*&EntityId=|\/\d+\/)(Ar|Ad|Pc)(\d+)/i, params:[3,6,4], replace: [[/%2F/gi, '/']]}; | |||
for (var template in historic) { | |||
var lr = copyAttributes({}, histregex); | |||
lr.regex = new RegExp(lr.regex.source.replace("HISTNAME", historic[template])); | |||
regexes[template] = lr; | |||
} | } | ||
return regexes[templateName]; | return regexes[templateName]; | ||
| שורה 240: | שורה 254: | ||
body.appendChild(table); | body.appendChild(table); | ||
body.appendChild(doc.createElement("p")); | body.appendChild(doc.createElement("p")); | ||
p = doc.createElement("p"); | var p = doc.createElement("p"); | ||
var checkboxes = {refCheckBox: " הערת שוליים:", listCheckBox: " פריט ברשימה:"} | |||
for (var box in checkboxes) { | |||
p.appendChild(doc.createTextNode(checkboxes[box])); | |||
doc[box] = copyAttributes(doc.createElement('input'), {type: "checkbox", doc: doc, onchange: updatePreview}); | |||
p.appendChild(doc[box]); | |||
} | |||
body.appendChild(p); | body.appendChild(p); | ||
p = doc.createElement("p"); | body.appendChild(p = doc.createElement("p")); | ||
copyAttributes(p.style, {background: "blue", color: "white", fontSize: "0.85em"} ); | copyAttributes(p.style, {background: "blue", color: "white", fontSize: "0.85em"} ); | ||
p.appendChild(doc.previewNode = doc.createTextNode(' ')); | p.appendChild(doc.previewNode = doc.createTextNode(' ')); | ||
body.appendChild(doc.createElement("p")); | body.appendChild(doc.createElement("p")); | ||
b = copyAttributes(doc.createElement("input"), {type:"button", value:"אישור", doc: doc, popup: popup}); | b = copyAttributes(doc.createElement("input"), {type:"button", value:"אישור", doc: doc, popup: popup}); | ||