您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Mturk PandaPush; Pushbullet for Panda Crazy
当前为
// ==UserScript== // @name Mturk PandaPush // @version 0.1 // @description Mturk PandaPush; Pushbullet for Panda Crazy // @author Skar3 // @include https://worker.mturk.com/requesters/PandaPush/projects // @require https://code.jquery.com/jquery-3.4.1.slim.min.js // @require https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js // @require https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js // @require https://gf.qytechs.cn/scripts/401969-pushbullet-js/code/pushbullet-js.js?version=797701 // @resource BootstrapCSS https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css // @grant GM_addStyle // @grant GM_getResourceText // @grant GM_getResourceURL // @namespace https://gf.qytechs.cn/users/541458 // ==/UserScript== document.head.appendChild(cssElement(GM_getResourceURL ("BootstrapCSS"))); document.title = 'PandaPush'; function cssElement(url) { var link = document.createElement("link"); link.href = url; link.rel="stylesheet"; link.type="text/css"; return link; } (function() { 'use strict'; function initPage() { var pageHtml = '<header><nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">' + '<a class="navbar-brand" href="#">PandaPush</a>' + '</nav>' + '</header>' + '<main role="main" class="flex-shrink-0"><div class="container" style="padding-top: 60px;">'+ '<form>' + '<div class="form-group">' + '<label for="pushbulletApi">Pushbullet API Key</label>' + '<input type="text" class="form-control" id="pushbulletApi">' + '</div>' + '<div class="form-group">' + '<label for="enablePush">Enable</label>' + '<input type="checkbox" checked class="form-control" id="enablePush">' + '</div>' + '<a href="#" id="api-save" class="btn btn-primary">Save</button>' + '</form>' + '</div></main>'; $("body").addClass('d-flex flex-column h-100'); $("body").html(pageHtml); $("#api-save").on( "click", function() { console.log($("#pushbulletApi").val()); localStorage.setItem("PANDAPUSH_api_key", $("#pushbulletApi").val()) }); var key = localStorage.getItem("PANDAPUSH_api_key"); if (key != null) { $("#pushbulletApi").val(key); } } var senthits = []; function sendPush(hit) { PushBullet.APIKey = $("#pushbulletApi").val(); var pushBody = 'PAY: ' + hit.pay + "\r\nDURATION: " + hit.duration + "\r\n " + hit.description; PushBullet.push("link", null, null, {title: hit.title, url: hit.continueURL, body: pushBody}, function(err, res) { if(err) { throw err; } else { console.log("Push sent"); } }); } function getPandaQueue() { var queue = localStorage.getItem("JR_QUEUE_StoreData"); if (queue != null) { queue = JSON.parse(queue); for (var i=0; i < queue.queue.length; i++) { var hit = queue.queue[i]; if (senthits.indexOf(hit.assignmentId) == -1) { if ($('#enablePush').is(":checked")) { sendPush(hit); senthits.push(hit.assignmentId); } } } } } setTimeout(function(){ console.log('PandPush loaded'); initPage(); setInterval(getPandaQueue, 1000); }, 1000); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址