您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
facebook invite
当前为
- // ==UserScript==
- // @name Inviter
- // @namespace http://codeot.com
- // @version 0.1
- // @description facebook invite
- // @author Talha Habib
- // @email talha@codeot.com
- // @match *://*.facebook.com/*
- // ==/UserScript==
- // -- start
- function inviteAll(){
- console.log("firing");
- for(var i=0; i<=document.querySelectorAll('._5i_q span ._42ft:not(._42fr):not(._59pe)').length;i++){
- setTimeout(Inviter,3000*i,i,document.querySelectorAll('._5i_q span ._42ft:not(._42fr):not(._59pe)').length);
- }
- }
- function Inviter(i,l){
- i = i+1;
- console.log("Invited "+ i +"Out of "+l);
- if(i==l){
- console.log("Trigger new");
- if(document.querySelectorAll("a[rel='async'].pam").length==1){
- loadMore();
- console.log("Got some more");
- setTimeout(inviteAll,5000);
- }else{
- console.log("--------------Closing-----------------");
- console.log("Invited all of them");
- }
- }
- document.querySelectorAll('._5i_q span ._42ft:not(._42fr):not(._59pe)')[i].click();
- }
- function loadMore(){
- document.querySelectorAll("a[rel='async'].pam")[0].click();
- }
- document.addEventListener ("keydown", function (zEvent) {
- if (zEvent.ctrlKey && zEvent.altKey && zEvent.code === "KeyG") {
- console.log("Key Detected");
- inviteAll();
- }
- });
- // -- end