מדיה ויקי:Gadget-TemplateParamWizard.js: הבדלים בין גרסאות בדף
←using [[mw:CodeEditor|CodeEditor]]: אפשרות לקוד ויקי בטולטיפים. |
trim |
||
| שורה 27: | שורה 27: | ||
function paramsFromSelection() { | function paramsFromSelection() { | ||
var selection = $("#wpTextbox1").textSelection('getSelection').replace(/ | var selection = $("#wpTextbox1").textSelection('getSelection').replace(/^\s*\{\{|\}\}\s*$/g, ''); //scrap the first {{ and last }} | ||
var specials = []; | var specials = []; | ||
while (true) { //extract inner links, inner templates and inner params - we don't want to sptit those. | while (true) { //extract inner links, inner templates and inner params - we don't want to sptit those. | ||