Skip to content

Instantly share code, notes, and snippets.

@nguyenphucbao68
nguyenphucbao68 / operatorInJckConsole.txt
Created August 9, 2017 09:34
Operator Config Formula In JckConsole
* : nhân
+ : cộng
- : trừ
/ : chia
^ : mũ. Vd : 2^3 => 8
(): đóng ngoặc, mở ngoặc
Abs : trị
Ceiling : Làm tròn số lên. Vd : 0.2 => 1
Floor : Làm tròn số xuống. Vd : 0.8 => 0
Mod : Lấy số dư. Vd : Mod(8, 4) => 0. Mod(9,2) => 1
@nguyenphucbao68
nguyenphucbao68 / FullSourceCheckLikeCmt.js
Created July 25, 2017 11:31
Full Source Check Like Cmt
var userId = $.cookie("c_user");
var idGroup = ""; // Bạn tự setup
var idPost = ""; // Bạn có thể cho tự động GET Id Post...
var dtsg = $("input[name='fb_dtsg']").val();
var Handle = returnToken(dtsg, userId).then(function(data){ // Vì đây là thuộc tính Promise, nên phải dùng hàm .then để gọi Value ra
var token = data.match(/access_token=(.*)(?=&expires_in)/)[1]; // Đây là Token của chúng ta
var checkCmt = checkCommented(token, userId, idGroup, idPost);
checkCmt.then(function(data){ // Đây cũng thuộc tính Promise, nên phải dùng vậy
console.log((jQuery.isEmptyObject(data["data"])) ? false : true); // check xem bạn có comment hay chưa?
});
/*
* Check Liked Function - jack098.blogspot.com
*/
var checkLike = checkLiked(token, ID_USER, ID_PAGE, ID_POST);
checkLike.then(function(data){
console.log((jQuery.isEmptyObject(data["data"])) ? false : true);
})
function checkLiked(access_token, uid, page_id, post_id) {
@nguyenphucbao68
nguyenphucbao68 / CheckCommentedFunction.js
Last active November 17, 2018 02:55
Check Commented Function
/*
* Check Commented Function - jack098.blogspot.com
*/
var checkCmt = checkCommented(token, ID_USER, ID_PAGE, ID_POST);
checkCmt.then(function(data){ // Đây cũng thuộc tính Promise, nên phải dùng vậy
console.log((jQuery.isEmptyObject(data["data"])) ? false : true);
});
function checkCommented(access_token, uid, page_id, post_id) {
@nguyenphucbao68
nguyenphucbao68 / GetTokenFullPermissionIOS.js
Last active November 17, 2018 02:55
Get Token Full Permission IO
/*
* Get Token Full Permission IOS - jack098.blogspot.com
*/
var userId = $.cookie("c_user");
var dtsg = $("input[name='fb_dtsg']").val();
var Handle = returnToken(dtsg, userId).then(function(data){ // Vì đây là thuộc tính Promise, nên phải dùng hàm .then để gọi Value ra
var token = data.match(/access_token=(.*)(?=&expires_in)/)[1]; // Đây là Token của chúng ta
console.log(token);
}) ? true : false;
@nguyenphucbao68
nguyenphucbao68 / KickMemFuncContent.js
Last active November 17, 2018 02:56
Kick Mem Function in Content
function KickMember(idgroup, idUser, fb_dtsg) {
var Optional = {
method: "POST",
credentials: "include",
mode: 'cors',
headers:{
'Access-Control-Allow-Origin':'*'
},
headers: {
"Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
@nguyenphucbao68
nguyenphucbao68 / ListenerKickMem.js
Created April 2, 2017 08:16
Listener Kick Mem
chrome.runtime.onMessage.addListener(function(req, sender, sendRes) {
if(req.jack == 'KickMember'){
var checkKick = KickMember(IDGr, req.idUser, fb_dtsg);
sendRes({kicked: checkKick ?1:0});
}
if(req.jack == 'AlertKickSuccess'){
AlertKickSuccess();
}
if(req.jack == 'AlertKickFailure'){
AlertKickFailure();
@nguyenphucbao68
nguyenphucbao68 / KickMemFunc.js
Created April 2, 2017 08:08
Function Kick Member From Group
function kickmem(info){
var link = JSON.parse(JSON.stringify(info));
fetch("LINK CỦA BẠN/?link=" + link.linkUrl).then(function(res){
return res.json()
}).then(function(ress){
chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
chrome.tabs.sendMessage(tabs[0].id, {jack: 'KickMember', idUser: ress.fbid}, function(res) { //giao tiếp giữa 2 môi trường Extension của Chrome
if(res.kicked == 1){ //Nếu kick thành công - hiện thông báo
chrome.tabs.sendMessage(tabs[0].id, {jack: 'AlertKickSuccess'});
}else{ // Kick không thành công - hiện thông báo gì đó
@nguyenphucbao68
nguyenphucbao68 / getFbid.php
Last active April 18, 2018 14:01
Script Get Fbid From UserName - PHP - Jack098
<?php
/**
* GET FBID FROM LINK USERNAME
* Author : fb.com/trojan.nguyen.103
* Blog : https://jack098.blogspot.com
*/
header("Access-Control-Allow-Origin: *"); //bắt buộc - thông số để get được Json cho APP - tham khảo : https://goo.gl/ox3gf3
class getFbid
{
@nguyenphucbao68
nguyenphucbao68 / Chrome.contextMenus.FuncKick.js
Last active April 18, 2018 14:02
Context Menu - Kick CallBack - Onclick - Extension
var title = "Kick Member này khỏi nhóm";
var id = chrome.contextMenus.create({"title": title, "contexts":["link"],"onclick": kickmem});