User:A930913/vada/plugin/wmfpaste.js

if(typeof window!="undefined"){ //inside Vada DOM (function{		var a930913_wmfpaste={			about:{				name:"WMF Labs Paste Queuebuilder",				description:"Use a paste from https://tools.wmflabs.org/paste/ to populate the queue",				namespace:"a930913_wmfpaste",				userscript:"User:A930913/vada/plugin/wmfpaste.js",			}		}		window.vada.loadPlugin(a930913_wmfpaste);	}); } else { //inside Vada process vada.dom.queue.builder.wmfpaste=new vada.dom.queue.Builder("wmfpaste"); vada.dom.queue.builder.wmfpaste.text="WMF Paste"; vada.dom.queue.builder.wmfpaste.input="Paste ID"; vada.dom.queue.builder.wmfpaste.action=function(params){ var xhr=new XMLHttpRequest; xhr.open("get","//tools.wmflabs.org/cluestuff/cgi-bin/vada/paste.py?id="+params.input,false); xhr.send; var data=xhr.responseText; var re=/\[\[([^\]\|]+)(?:\|[^\]]+)?\]\]/g, matches=[], found; while(found=re.exec(data)){ vada.dom.queue.push(new vada.Page(found[1])); }		vada.dom.queue.redraw; }	vada.dom.queue.builders.push(vada.dom.queue.builder.wmfpaste); vada.dom.queue.builders.redraw; }