Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name StackExchange Review Refresher
- // @namespace http://danrossiter.org/
- // @version 1.0
- // @description Auto-refreshes StackExchange review pages at set intervals. If reviews are open, opens each open section in new tab.
- // @match http://stackoverflow.com/review
- // @match http://superuser.com/review
- // @match http://*.stackexchange.com/review
- // @copyright 2014+, Dan Rossiter
- //
- // @require //ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js
- // ==/UserScript==
- var refreshRate = 5 /* min */ * 60 /* s */ * 1000 /* ms */;
- // all categories that user can review
- $('.dashboard-count:not(.dashboard-faded)').each(
- function() {
- // number of items to be reviewed
- var num = $(this).children('.dashboard-num').attr('title');
- if ('0' != num) {
- // get anchor tag from dash title
- var dash_title_a = $(this).siblings('.dashboard-summary')
- .children('.dashboard-title').children('a');
- // get window name and URL
- var url = dash_title_a.attr('href');
- var name = dash_title_a.text();
- // open review window
- window.open(url, name, "height=700,width=1200");
- }
- }
- );
- // reload every 5 minutes
- setTimeout(function () { location.reload(); }, refreshRate);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement