میدیاویکی:Gadget-Extra-Editbuttons-RegexTest.js

لە ئینسایکڵۆپیدیای ئازادی ویکیپیدیاوە
تێبینی: دوای پاشەکەوتکردن، پێویستە کاشی وێبگەڕەکەت پاک بکەیتەوە تا گۆڕانکارییەکان ببینیت. بۆ گووگڵ کڕۆم، فایەرفۆکس، مایکرۆسۆفت ئێج و سافاری: پەنجە لەسەر دوگمەی ⇧ Shift ڕاگرە و کرتە لەسەر Reload بکە. بۆ وردەکاری و ڕێنمایییەکان لەسەر وێبگەڕەکانی تر، بڕوانە ئێرە.
// [[fa:Mediawiki:Gadget-Extra-Editbuttons-RegexTest.js]]

mw.loader.load( '//ckb.wikipedia.org/wiki/میدیاویکی:Gadget-Extra-Editbuttons-dictionary.js&action=raw&ctype=text/javascript' );
var dictionary=kurdishToolsDictionary;
var dictionary=dictionary.complexes;
var my_list=[];
var wrong_list=[];
for (i in dictionary) {
	if (dictionary.hasOwnProperty(i)) {
		var firstPart=i.split('|');
		var secondPart=dictionary[i].split('|');
		for (y in firstPart){
			for (x in secondPart){
				var new_word=firstPart[y].replace('(','').replace(')','')+'-'+secondPart[x].replace('(','').replace(')','');
				if (my_list.indexOf(new_word) != -1){
					wrong_list.push(new_word);
					//alert('yes > ' + new_word)
				}else{
					my_list.push(new_word);
					//alert(new_word)

				}
			}
		}
	}
}
alert(wrong_list);