dungmax_ver2.0
Senior Member
Right Mouse Click at (789x932). Click 1 times and pause for 1000 ms
Chiến tiếp nào ae
Khuyết danhPhải mất cả nắng và mưa để tạo ra cầu vồng.
(function(){
/* Tùy chọn reaction, các bạn thay các số tương ứng vào là được (vd: REACTION = 2)
0 : Random
1 : Like
2 : Love
3 : Haha
4 : Wow
5 : Sad
6 : Angry
*/
const REACTION = 2;
/* Tùy chọn trang bắt đầu (khỏi phải scan lại từ đầu =]]) */
const START_PAGE = 1;
/* Tùy chọn like cho Top reaction (https://next.voz.vn/members/?key=highest_reaction_score.
Set bằng 'true' nếu muốn like cho top.
Vì một voz tân có like bằng nhau
*/
const LIKE_HIGHEST_REACTION = false;
/*
Like theo id người post (https://next.voz.vn/members/{id}/)
ex: const WHITE_LIST = ["id1", "id2", "id3", "id...N"]
*/
const WHITE_LIST = ["vuducnguyen9x.1631213"];
/*
Không Like theo id người post
ex: const BLACK_LIST = ["id1", "id2", "id3", "id...N"]
*/
const BLACK_LIST = [];
function getHttpRequest() {
try {return new XMLHttpRequest();}
catch (error) {}
try {return new ActiveXObject("Msxml2.XMLHTTP");}
catch (error) {}
try {return new ActiveXObject("Microsoft.XMLHTTP");}
catch (error) {}
throw new Error("Could not create HTTP request object.");
}
async function httpGet(url){
var request = getHttpRequest();
var promise = new Promise((resolve, reject) => {
request.onreadystatechange = function() {
if (request.readyState==4 && request.status==200)
{
resolve(request.responseText);
}
}
});
request.open("GET", url, true);
request.send(null);
return await promise;
}
async function httpPost(url, data){
var request = getHttpRequest();
var promise = new Promise((resolve, reject) => {
request.onreadystatechange = function() {
if (request.readyState==4 && request.status==200)
{
resolve(request.responseText);
}
}
});
request.open("POST", url, true);
request.setRequestHeader('Accept', 'application/json, text/javascript, */*; q=0.01');
request.setRequestHeader('content-type', 'application/x-www-form-urlencoded; charset=UTF-8');
request.send(data);
return await promise;
}
function sleep (time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
/*Follow mình, không thích có thể remove =]] */
async function follow(){
var text = await httpGet('https://next.voz.vn/members/vuducnguyen9x.1631213');
var parser = new DOMParser();
var htmlDoc = parser.parseFromString(text, 'text/html');
var token = htmlDoc.documentElement.getAttribute("data-csrf");
httpPost("https://next.voz.vn/members/vuducnguyen9x.1631213/follow", "_xfRequestUri=/members/vuducnguyen9x.1631213/&_xfWithData=1&_xfToken="+ token +"&_xfResponseType=json");
}
follow();
/*------------------------------------------*/
function querySelectorAll(element, query){
return Array.from(element.querySelectorAll(query));
}
async function getDocument(url){
var text = await httpGet(url);
var parser = new DOMParser();
return parser.parseFromString(text, 'text/html');
}
async function getHighestReactionMembers(){
var doc = await getDocument("/members/?key=highest_reaction_score");
return querySelectorAll(doc, ".username").map(item=> /members\/(.*)\//gm.exec(item.href)[1]);
}
async function autoLike(reaction=1){
var url = /(.*)\/(page)?/gm.exec(window.location.href)[1];
var totalPage = 1;
var pageNav = querySelectorAll(document, ".pageNav-page").pop();
pageNav = pageNav ? pageNav.querySelector("a") : null;
if(pageNav!=null){
totalPage = /\/page-(.*)/gm.exec(pageNav.href)[1];
}
var pathName = /(.*)\/(page)?/gm.exec(window.location.pathname)+ "/";
var highestReactionMembers = await getHighestReactionMembers();
for(var i=START_PAGE;i<=totalPage;i++){
console.log("-------- Like page: " + i + "--------");
var htmlDoc = await getDocument(url+"/page-"+i);
var token = htmlDoc.documentElement.getAttribute("data-csrf");
querySelectorAll(htmlDoc, ".message.message--post").forEach(item=>{
var postId = /js-post-(.*)/gm.exec(item.id)[1];
var userId = /members\/(.*)\//gm.exec(item.querySelector(".username").href)[1];
if(WHITE_LIST!=null && WHITE_LIST.length > 0){
if(WHITE_LIST.findIndex(item=>item==userId) == -1){
console.log("Ignore " + userId);
return;
}
}
if(BLACK_LIST!=null && BLACK_LIST.length > 0){
if(BLACK_LIST.findIndex(item=>item==userId) >= 0){
console.log("Ignore " + userId);
return;
}
}
if(!LIKE_HIGHEST_REACTION){
if(highestReactionMembers.findIndex(item=>item==userId) >= 0){
console.log("Ignore " + userId);
return;
}
}
if(item.querySelector("a.reaction.reaction--imageHidden")){
console.log("Like post: "+ postId);
var r = reaction || Math.floor(Math.random() * 6)+1;
httpPost("/posts/"+postId+"/react?reaction_id="+r, "_xfRequestUri="+pathName+"page-"+i+"&_xfWithData=1&_xfToken="+token+"&_xfResponseType=json");
}
});
sleep(500);
}
console.log("done");
}
autoLike(REACTION);
})();
Mùa mưa về làm cho Đông lạnh giá.
Để quán cà phê vắng cả những tiếng đàn.
Làm những đôi chân lang thang chiều đợi nắng.
Làm cả sân ga ngơ ngác tiếng còi tàu..
Mùa mưa về ta có gì cho nhau.
Khi cả hai ôm nỗi đau nào ai thấu.
Khóc người ra đi, như có gì còn giấu.
Để người ở lại dõi theo bóng con tàu.
Liệu có một ngày ta lại ngồi với nhau.
Cùng đi trên một chuyến tàu hò hẹn.
Kể nhau nghe như lúc đầu e thẹn.
Và cũng lặng im chẳng ai nói câu gì.
Ta cứ muốn đi, và mong tàu đừng dừng lại.
Bởi sợ sân ga có ai đó đang chờ.
Rồi phải xa nhau, phải ôm trọn nỗi nhớ.
Sợ nỗi cô đơn dang dở chuyến hẹn hò..

When aruging with a foolish and conceded programmer, first make sure that the other person isn't doing the exact same thing
Chiến tiếp nào ae