Modificare Script de redenumirea satelor pe versiunea 8.2

CarlaDaimler

Buna seara.

imi poate actualiza cineva acest script de redenumirea satelor?


javascript:var Prefix_text="OricareNume";Prefix_text1="";function%20convert_coords(x,y){con=Math.floor(y/100)+''+Math.floor(x/100);sec=(Math.floor(y/10)%2510)+''+(Math.floor(x/10)%2510);sub=(y%2510)+''+(x%2510);var%20loc;if(parseInt(sec)<50){loc='N';} else{loc='S';}if(parseInt(sec)%2510<5){loc=loc+'W';}else{loc=loc+'E';}return%20Prefix_text1+'['+con+':'+sec+':'+sub+'] '+Prefix_text;}var%20doc=document;if(window.frames.length>0)doc=window.main.document;var%20inputs=doc.getElementsByTagName('input');for(i=0;i<inputs.length;i++){id=inputs.id;index=id.indexOf('edit_input');if(index!=-1){id=id.substring(index+11);str=doc.getElementById('label_text_'+id).innerHTML;mid=str.lastIndexOf('|');x=str.substring(str.lastIndexOf('(')+1,mid);y =str.substring(mid+1,str.lastIndexOf(')'));inputs.value=convert_coords(x,y);inputs[i+1].click();}}end();


telul e ca satele sa fie redenumite astfel (marcat):


[55:51:83] OricareNume 8,988 513|558 K55
[55:87:18] OricareNume 9,761 578|581K55
[55:87:44] OricareNume 6,655 574|584 K55
[55:87:54] OricareNume 9,761 574|585 K55
[55:87:77] OricareNume 9,761 577|587 K55

multumesc
 

ChineZeu

member
Incearca cu asta
Cod:
javascript: void($.getScript('https://dl.dropbox.com/u/100563986/rename/villages.js'))
Pe privirea generala dai click pe script si in casuta aia pui numele dorit. In cazul tau [convert] OricareNume si apesi Renumire
 

gagutza

poate cineva sa actualizeze acest script de denumire a satelor pt. versiunea 8.2. multumesc.

javascript:var array=['k0','k1','k2','k3','k4','k5','k6','k7','k8','k9','k10','k11','k12','k13','k14','k15','k16','k17','k18','k19','k20','k21','k22','k23','k24','k25','k26','k27','k28','k29','k30','k31','k32','k33','k34','k35','k36','k37','k38','k39','k40','k41','k42','k43','k44','k45','k46','k47','k48','k49','k50','k51','k52','k53','k54','k55','k56','k57','k58','k59','k60','k61','k62','k63','k64','k65','k66','k67','k68','k69','k70','k71','k72','k73','k74','k75','k76','k77','k78','k79','k80','k81','k82','k83','k84','k85','k86','k87','k88','k89','k90','k91','k92','k93','k94','k95','k96','k97','k98','k99'];function convert_coords(x,y){hr=Math.floor(y/100)+''+Math.floor(x/100);mn=(Math.floor(y/10)%2510)+''+(Math.floor(x/10)%2510);sc=(y%2510)+''+(x%2510);for(var i=0;i<100;i++){if(i==hr){a=array}}return a}var doc=document;if(window.frames.length>0)doc=window.main.document;var inputs=doc.getElementsByTagName('input');for(i=0;i<inputs.length;i++){id=inputs.id;index=id.indexOf('edit_input');if(index!=-1){id=id.substring(index+11);str=doc.getElementById('label_text_'+id).innerHTML;mid=str.lastIndexOf('|');x=str.substring(str.lastIndexOf('(')+1,mid);y=str.substring(mid+1,str.lastIndexOf(')'));inputs.value=convert_coords(x,y);inputs[i+1].click()}}end();
 

ChineZeu

member
Cod:
javascript: void($.getScript('https://dl.dropbox.com/u/100563986/rename/villages.js'))
Pe privire generala dai clic pe script si in casuta aia scrii continent si apesi Renumire, iti va aparea K-ul. In cazul satelor cu continent 1-9 va aparea K01.
 

gagutza

in scriptul de mai sus daca inlocuiam k1-k2-...-k99 dintre ghilimele cu denumirea de sate pe care o vroiam eu pt. k-ul respectiv imi punea automat din privirea generala denumirea la sate diferit in functie de k chiar daca erau sate in grupa respectiva din k-uri diferite (in functie de k mi le denumea diferit pe toate).
 

ChineZeu

member
PHP:
javascript: (function (RenameVillagesByContinents) {
    var k00 = ['k00', 'k01', 'k02', 'k03', 'k04', 'k05', 'k06', 'k07', 'k08', 'k09'];
    var k10 = ['k10', 'k11', 'k12', 'k13', 'k14', 'k15', 'k16', 'k17', 'k18', 'k19'];
    var k20 = ['k20', 'k21', 'k22', 'k23', 'k24', 'k25', 'k26', 'k27', 'k28', 'k29'];
    var k30 = ['k30', 'k31', 'k32', 'k33', 'k34', 'k35', 'k36', 'k37', 'k38', 'k39'];
    var k40 = ['k40', 'k41', 'k42', 'k43', 'k44', 'k45', 'k46', 'k47', 'k48', 'k49'];
    var k50 = ['k50', 'k51', 'k52', 'k53', 'k54', 'k55', 'k56', 'k57', 'k58', 'k59'];
    var k60 = ['k60', 'k61', 'k62', 'k63', 'k64', 'k65', 'k66', 'k67', 'k68', 'k69'];
    var k70 = ['k70', 'k71', 'k72', 'k73', 'k74', 'k75', 'k76', 'k77', 'k78', 'k79'];
    var k80 = ['k80', 'k81', 'k82', 'k83', 'k84', 'k85', 'k86', 'k87', 'k88', 'k89'];
    var k90 = ['k90', 'k91', 'k92', 'k93', 'k94', 'k95', 'k96', 'k97', 'k98', 'k99'];
    $(".rename-icon").each(function (i, a) {
        var n = $(a).prev("a").find(".quickedit-label");
        i = [].concat(k00, k10, k20, k30, k40, k50, k60, k70, k80, k90);
        i = i[+n.html().trim().match(/\d+$/g)];
        if (i && n.attr('data-text') != i) {
            $(a).click(), $(a).parent().next().find('input[type*="text"]').val(i);
            $(a).parent().next().find('input[type*="button"]').click()
        }
    })
})("chinez unikt")
Incearca cu asta.