Skip to main content
added 1258 characters in body
Source Link
Malachi
  • 29.1k
  • 11
  • 87
  • 188

Removing some of the code where this would refresh, I forgot to alter the @match's and this made it kind of tricky to do a review (I changed the timer to 20 seconds)

I needed to remove the wildcard from the end

like this

// @match *://*.stackexchange.com/review
// @match *://*.stackoverflow.com/review
// @match *://*.superuser.com/review
// @match *://*.serverfault.com/review
// @match *://*.askubuntu.com/review
// @match *://*.stackapps.com/review
// @match *://*.mathoverflow.net/review

In addition, I also changed the timeout on the popup, because if I had left the window open and left my computer for some time and there was a review left, it would populate a new popup and never dispose it, it was a PITA to close them all and I would rather check the review page when I get back to my desk than have all those glaring at me.

if (notifications.length) {
    var details = {
        title: document.title,
        text: notifications.join('\n'),
        timeout: 0
    };
    GM_notification(details, null);
}

became this (with some changes that @Quill suggested)

if (reviewCount > 0) {
    var details = {
        title: document.title,
        text: reviewCount + ' Review Items',
        timeout: 15000
    }
    GM_notification(details, null);
}

and I also changed

var title = document.title.split(' - '); // keep the site name
document.title = 'Desktop Notifications - ' + title[1];

to this

document.title = document.title.split(' - ')[1] + ' Review Queue'; // keep the site name

we already know that it is a desktop notification, there is no need to throw it in my face every time.

Removing some of the code where this would refresh, I forgot to alter the @match's and this made it kind of tricky to do a review (I changed the timer to 20 seconds)

I needed to remove the wildcard from the end

like this

// @match *://*.stackexchange.com/review
// @match *://*.stackoverflow.com/review
// @match *://*.superuser.com/review
// @match *://*.serverfault.com/review
// @match *://*.askubuntu.com/review
// @match *://*.stackapps.com/review
// @match *://*.mathoverflow.net/review

Removing some of the code where this would refresh, I forgot to alter the @match's and this made it kind of tricky to do a review (I changed the timer to 20 seconds)

I needed to remove the wildcard from the end

like this

// @match *://*.stackexchange.com/review
// @match *://*.stackoverflow.com/review
// @match *://*.superuser.com/review
// @match *://*.serverfault.com/review
// @match *://*.askubuntu.com/review
// @match *://*.stackapps.com/review
// @match *://*.mathoverflow.net/review

In addition, I also changed the timeout on the popup, because if I had left the window open and left my computer for some time and there was a review left, it would populate a new popup and never dispose it, it was a PITA to close them all and I would rather check the review page when I get back to my desk than have all those glaring at me.

if (notifications.length) {
    var details = {
        title: document.title,
        text: notifications.join('\n'),
        timeout: 0
    };
    GM_notification(details, null);
}

became this (with some changes that @Quill suggested)

if (reviewCount > 0) {
    var details = {
        title: document.title,
        text: reviewCount + ' Review Items',
        timeout: 15000
    }
    GM_notification(details, null);
}

and I also changed

var title = document.title.split(' - '); // keep the site name
document.title = 'Desktop Notifications - ' + title[1];

to this

document.title = document.title.split(' - ')[1] + ' Review Queue'; // keep the site name

we already know that it is a desktop notification, there is no need to throw it in my face every time.

Source Link
Malachi
  • 29.1k
  • 11
  • 87
  • 188

Removing some of the code where this would refresh, I forgot to alter the @match's and this made it kind of tricky to do a review (I changed the timer to 20 seconds)

I needed to remove the wildcard from the end

like this

// @match *://*.stackexchange.com/review
// @match *://*.stackoverflow.com/review
// @match *://*.superuser.com/review
// @match *://*.serverfault.com/review
// @match *://*.askubuntu.com/review
// @match *://*.stackapps.com/review
// @match *://*.mathoverflow.net/review