Exactly the same things on Firefox
It happened to me too. I use FF. there is no edit count monitor show up.
I apologize for the FF issue. I released a fix to get the script to work in WME beta, but apparently it broke it for people using Greasemonkey. As a temporary workaround until I get time to fix it, if you are able to install Tampermonkey in FF and install the Edit Count Monitor with that, I believe it should work.
-
install Tampermonkey:
http://tampermonkey.net/index.php?ext=dhdg&browser=firefox -
then install edit count monitor again:
https://greasyfork.org/en/scripts/19941-waze-edit-count-monitor
Now, it work on Chrome for me!
Thanks ![]()
RELEASE Version 0.9.2
Should now work in FF Greasemonkey and WME beta.
This was a major overhaul of the script architecture to attempt to get it to work reliably in FF with Greasemonkey. Please let me know if you encounter any issues.
Thanks!
MapOMatic
Great job, thanks a lot ![]()
I install tampermonkey, and install Edit Count Monitor, and its work. Thanks a lot.
With the last update, it works again with GreaseMonkey ! ![]()
Thank you MapOMatic! ![]()
MapOMatic, maybe consider using the regex for the include list? Reference here.
Thanks. I’ll update the include soon. I need to do that on all of my scripts.
This might be off topic: I keep getting warnings when I try to set SLs on segments I havent even touched. It usually occurs when I select a large batch of segments or even small ones if I set SL thrice in a row. I also tried searching for a discussion regarding throttling but I really could not find one. Or doing that is really within the definition of throttling?
Throttling normally refers to making a “large” number of edits in a “short” time interval and not being given credit for those edits or any other edit with a “certain” time interval. (“large”, “short” and “certain” defined by Waze and subject to change.)
What you are describing doesn’t have to do with “how many” or “how fast” but just the idea that you can only get one edit point per segment per day (or 24-hour period?)
If you change the same segment more than once within a day, you aren’t getting credit for the edits beyond the first one. So the edit count monitor is accurately showing you that.
You haven’t really been throttled (as that word is normally used) since changing a new segment will give you an edit count (without waiting for any throttling period to expire.)
Hello MapOMatic, I’m from Brazil and I liked your work. So I felt free to translate your script to brazilian portuguese (pt_br).
Here is the code and here is the link:
[code]// ==UserScript==
// @name Waze Edit Count Monitor (pt-BR)
// @namespace
// @version 0.9.2
// @description Owner is MapOMatic. Translation by me. Mostra a contagem diária de suas edições realizadas no WME. Alerta se está acelerado. Original link: https://greasyfork.org/en/scripts/19941-waze-edit-count-monitor
// @author GabiruDriverX
// @include https://beta.waze.com/*editor/*
// @include https://www.waze.com/*editor/*
// @exclude https://www.waze.com/*user/editor/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js
// @grant GM_xmlhttpRequest
// @connect www.waze.com
// @icon https://wiki.waze.com/wiki/images/3/31/Wazer-with-premission.png
// original link: https://greasyfork.org/en/scripts/19941-waze-edit-count-monitor
// ==/UserScript==
function WECM_Injected() {
var debugLevel = 0;
var $outputElem = null;
var $outputElemContainer = null;
var pollingTime = 1000; // Time between checking for saves (msec).
var lastEditCount = null;
var lastCanSave = true;
var userName = null;
var savesWithoutIncrease = 0;
var lastURCount = null;
var tooltipText = ‘Contagem diária de suas edições. Clique para abrir seu perfil.’;
function log(message, level) {
if (message && level <= debugLevel) {
console.log('Monitor de contagem de edição: ' + message);
}
}
function checkForSave() {
var canSave = W.model.actionManager.canSave();
var canRedo = W.model.actionManager.canRedo();
if (lastCanSave && !canSave && !canRedo) {
window.postMessage(JSON.stringify(['wecmGetCounts',userName]),'*');
}
lastCanSave = canSave;
}
// This is a hack, because I haven't had time to figure out how to listen for a 'save' event yet.
function loopCheck() {
checkForSave();
setTimeout(loopCheck, pollingTime);
}
function updateEditCount(editCount, urCount) {
var textColor;
var bgColor;
var tooltipTextColor;
log('edit count = ' + editCount + ', UR count = ' + urCount.count, 1);
if (lastEditCount !== editCount || lastURCount !== urCount.count) {
savesWithoutIncrease = 0;
} else {
savesWithoutIncrease += 1;
}
switch (savesWithoutIncrease) {
case 0:
case 1:
textColor = '';
bgColor = '';
tooltipTextColor = 'white';
break;
case 2:
textColor = '';
bgColor = 'yellow';
tooltipTextColor = 'black';
break;
default:
textColor = 'white';
bgColor = 'red';
tooltipTextColor = 'white';
}
$outputElemContainer.css('background-color', bgColor);
$outputElem.css('color', textColor).html('Edições: ' + editCount);
var urCountText = "<div style='margin-top:8px;padding:3px;'>UR's fechadas: " + urCount.count + " \n(desde " + (new Date(urCount.since)).toLocaleDateString() + ")</div>";
var warningText = (savesWithoutIncrease > 0) ? "<div style='border-radius:8px;padding:3px;margin-top:8px;margin-bottom:5px;color:"+ tooltipTextColor + ";background-color:" + bgColor + ";'>" + savesWithoutIncrease + ' Consecutivos saves sem aumentar. (Você está acelerado?)</div>' : '';
$outputElem.attr('data-original-title', tooltipText + urCountText + warningText);
lastEditCount = editCount;
lastURCount = urCount.count;
}
function receiveMessage(event) {
var msg;
try {
msg = JSON.parse(event.data);
}
catch (err) {
// Do nothing
}
if (msg && msg[0] === "wecmUpdateUi") {
var editCount = msg[1][0];
var urCount = msg[1][1];
updateEditCount(editCount, urCount);
}
}
function init() {
'use strict';
userName = W.loginManager.user.userName;
$outputElemContainer = $('<div>', {style:'border-radius: 23px; height: 23px; display: inline; float: right; padding-left: 10px; padding-right: 10px; margin: 9px 5px 8px 5px; font-weight: bold; font-size: medium;'});
$outputElem = $('<a>', {id: 'wecm-count',
href:'https://www.waze.com/user/editor/' + userName.toLowerCase(),
target: "_blank",
style:'text-decoration:none',
'data-original-title': tooltipText});
$outputElemContainer.append($outputElem);
$('.waze-icon-place').parent().prepend($outputElemContainer);
$outputElem.tooltip({
placement: 'auto top',
delay: {show: 100, hide: 100},
html: true,
template: '<div class="tooltip" role="tooltip" style="opacity:0.95"><div class="tooltip-arrow"></div><div class="my-tooltip-header"><b></b></div><div class="my-tooltip-body tooltip-inner" style="font-weight: 600; !important"></div></div>'
});
window.addEventListener('message', receiveMessage);
loopCheck();
log('Initialized.',0);
}
function bootstrap()
{
if (W &&
W.loginManager &&
W.loginManager.events &&
W.loginManager.events.register &&
W.map &&
W.loginManager.isLoggedIn()) {
log('Inicializando...', 0);
init();
} else {
log('Bootstrap falhou. Tente novamente...', 0);
window.setTimeout(function () {
bootstrap();
}, 1000);
}
}
bootstrap();
}
/* Code that is NOT injected into the page */
(function(){
var alertUpdate = true;
var wecmVersion = GM_info.script.version;
var wecmChangesHeader = “Waze Edit Count Monitor foi atualizado.\nv” + wecmVersion + “\n\nO que há de novo\n-------------------------”;
var wecmChanges = wecmChangesHeader + “\n- Agora deve funcionar em FF Greasemonkey e em WME beta.”;
function getEditorProfileFromSource(source) {
var match = source.match(/W.EditorProfile.data\s=\s+JSON.parse\('(.*?)'\)/i);
return JSON.parse(match[1]);
}
function getEditCountFromProfile(profile) {
var editingActivity = profile.editingActivity;
return editingActivity[editingActivity.length-1];
}
function getURCountFromProfile(profile) {
var editsByType = profile.editsByType;
for (i=0; i < editsByType.length; i++) {
if (editsByType[i].key == 'mapUpdateRequest') {
return editsByType[i].value;
}
}
return -1;
}
// Listen for a message from the page.
function receiveMessage(event) {
var msg;
try {
msg = JSON.parse(event.data);
}
catch (err) {
// Do nothing
}
if (msg && msg[0] === "wecmGetCounts") {
var userName = msg[1];
GM_xmlhttpRequest({
method: "GET",
url: 'https://www.waze.com/user/editor/' + userName,
onload: function(res) {
var profile = getEditorProfileFromSource(res.responseText);
window.postMessage(JSON.stringify(['wecmUpdateUi',[getEditCountFromProfile(profile), getURCountFromProfile(profile)]]),'*');
}
});
}
}
$(document).ready(function() {
/* Check version and alert on update */
if (alertUpdate && ('undefined' === window.localStorage.wecmVersion ||
wecmVersion !== window.localStorage.wecmVersion)) {
alert(wecmChanges);
window.localStorage.wecmVersion = wecmVersion;
}
});
var WECM_Injected_script = document.createElement("script");
WECM_Injected_script.textContent = "" + WECM_Injected.toString() + " \n" + "WECM_Injected();";
WECM_Injected_script.setAttribute("type", "application/javascript");
document.body.appendChild(WECM_Injected_script);
window.addEventListener('message', receiveMessage);
})();[/code]
This is my second script translation, I’m like a newbie so I’m sorry if I did something wrong and I’m open to start a conversation ![]()
That’s great! Thanks for taking the time to translate. Ideally translations would be built into the original script and the user could choose a language when installing. Then you wouldn’t need to worry about keeping a separate script updated whenever new versions are released. That may be something you and I could investigate in the future, but I won’t have time to work on it for a while. I’ll be in touch when I do. Thanks again.
Amazing script, congrats
Enviado desde mi iPhone utilizando Tapatalk
Hi,
I had previously tried your script with good results but didn’t leave it installed. I wanted to try it again but the latest version isn’t working for me. I did a bit of digging on the console and this is what shows up.
[Log] Edit Count Monitor: Bootstrap failed. Trying again... (editor, line 15)
[Log] Edit Count Monitor: Initializing... (editor, line 15)
[Log] Edit Count Monitor: Initialized. (editor, line 15)
[Error] TypeError: null is not an object (evaluating 'match')
getEditorProfileFromSource (Anonymous Script 1 (line 169))
onload (Anonymous Script 1 (line 203))
(anonymous function) (Script Element 1:2:303)
(anonymous function) (Anonymous Script 2 (line 27:339))

I found that downgrading to version 0.8, which does not contain the code mentioned the flagged code, made it work again.
Is there any chance for an updated version addressing this issue?
BTW, I’m running it in Safari 10.0.1 through Tampermonkey, in case it matters.
Love this script. Just thought I’d throw a color suggestion out here…
The scenario is that I often found myself checking the tooltip to see if my last edit was throttled so that I’d only loose 150 edits instead of 300. So… I mod’d your script to change the count text to turn yellow after 1 missed save, and I like it!
I saw the the original color post (below), but I don’t worry about false positives when I’m reediting stuff since it’s usually while fighting WME errors anyways.
Anyway, just thought I’d make the suggestion for the next version and see what others think.
Mod for ver 0.9.2 is @line 61 –
switch (savesWithoutIncrease) {
case 0:
textColor = '';
bgColor = '';
tooltipTextColor = '';
break;
case 1:
textColor = 'yellow';
bgColor = '';
tooltipTextColor = 'yellow';
break;
case 2:
textColor = '';
bgColor = 'yellow';
tooltipTextColor = 'black';
break;
default:
textColor = 'white';
bgColor = 'red';
tooltipTextColor = 'white';
}
-Dana
Thanks for the feedback. I could add an option to allow people to customize the values as they see fit. I’ll add that to the to-do list.
In the past couple of days, the edit count monitor has been randomly disappearing or reappearing as I refresh WME. Sometimes it takes several refreshes to get it to reappear. Not sure if there is an issue with the script itself or just my computer, but figured it was worth mentioning in case anyone else has had it arise.
It’s not an issue with the script nor WME, it was an issue with the dashboard…