您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Pulls the correct forum post count
当前为
- // ==UserScript==
- // @name Waze Editor Profile Enhancements
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description Pulls the correct forum post count
- // @author JustinS83
- // @include https://www.waze.com/user/editor*
- // @grant GM_xmlhttpRequest
- // ==/UserScript==
- (function() {
- 'use strict';
- function bootstrap(tries) {
- tries = tries || 1;
- if (W &&
- W.EditorProfile &&
- $) {
- init();
- } else if (tries < 1000) {
- console.log(tries);
- setTimeout(function () {bootstrap(tries++);}, 200);
- }
- }
- bootstrap();
- function init(){
- $.get('https://www.waze.com/forum/memberlist.php?username=' + W.EditorProfile.data.username, function(forumResult){
- var re = forumResult.match(/<a.*?"Search user’s posts">(\d+)<\/a>/)[1];
- $('#header > div > div.user-info > div > div.user-highlights > div > div:nth-child(3) > div.user-stats-value')[0].innerHTML = re;
- });
- }
- })();