There are 3 previous versions of this script.
// ==UserScript==
// @name vkAutoMarker
// @namespace vkontakte
// @description marks on video automatically
// @include http://vkontakte.ru/video*
// @exclude http://vkontakte.ru/video.php?*
// @author KOLANICH
// @version 1.1a
// ==/UserScript==
/////////////////////////////////////////////
/*
it is an alpha version
please test it and help me to solve the problemm without unsecure window
you can`t use it in your scripts*/
//////////////////////////////////////////////
//alert("script loaded");
/*var incjf = document.createElement('script');
incjf.setAttribute('type', 'text/javascript');
incjf.setAttribute('src', "http://jqueryjs.googlecode.com/files/jquery-1.3.1.js");
incjf.setAttribute('defer', 'defer');
document.getElementsByTagName('HEAD')[0].appendChild(incjf);
alert("jquery included");
*/
markbutt=document.getElementById('videoactions');//.getElementsByTagName('*')[0].onclick();
markallbutt = document.createElement('A');
markallbutt.setAttribute('src', "#");
markallbutt.setAttribute('style', "cursor:pointer");
//markallbutt.setAttribute('onclick', "automark()");
markbutt1=markbutt.getElementsByTagName('A')[0];
markbutt1.style.color="red";//the button "отметить" is recognised correctly if it is red
//markbutt1.onclick();
markallbutt.addEventListener ("click",function(){automark();},false);
markallbutt.innerHTML="Отметить Всех";
markbutt.appendChild(markallbutt);
//markbutt=markbutt.getElementsByTagName('A')[0];
//markbutt.onclick();
//alert(markbutt);
function automark(){
//document.getElementById('videoactions').getElementsByTagName('*')[0].click();
markbutt1.onclick();//подгружаем список друзей кликая по отметить(с click() тоже пробовал -хз )
//document.getElementById('selector').style.display='';
for(blabla=0;blabla<5000;blabla++){
var elem = document.getElementById('f'+blabla);
if(elem == null) break;
elem.onclick();
}
alert("Отмечено "+blabla+" друзей");
}
//alert('function defined');
//automark();
