On a lighter note: Count the bugs fixed on Desktopteam Blog

Once you've installed this UserScript Javascript file, you'll get the bugs-fixed list on the Desktop Team's blog presented as an <ol> instead of a bulleted <ul> list. A neat line summarizing it all comes for free. πŸ˜‰ …


// ==UserScript==
// @name opera-desktopblog-ll
// @description Enumerated bugs list in Opera Desktopteam's blog
// @copyright Copyright (C) by XA, IX 2011.
// @license Licensed under a Creative Commons CC-by-nc-sa 3.0 Unported license.
// @version 1.1.0
// @date 2011-09-09
// @include http://my.opera.com/desktopteam/blog/2*
// ==/UserScript==

(function () {

window.addEventListener('DOMContentLoaded',
function (ev) {
if (!(ev.target instanceof HTMLDocument)) return;

var eRoot = document.querySelector('div#firstpost');
if (!eRoot) {
console.log('[UserJS::OperaDesktopBlog] No suitable posting-root found');
return;
}

var eeList = eRoot.querySelectorAll('div.content > ul.bullets');
var cnt = 0;
var l = eeList.length;
for (var eUL, i = 0; i < l; ++i) { // download list skipped by selector above
eUL = eeList[i];
eUL.style.listStyleType = 'decimal';

var eeLItem = eUL.querySelectorAll('li');
cnt += eeLItem.length;
}

if (cnt) {
var e = document.createElement('div');
e.innerHTML = '<strong style="font-style:italic;">β†’ These lists account for at least '+ cnt +' bugs fixed. ☺</strong>';
eRoot.appendChild(e);
}

// stop listening on event
window.removeEventListener('DOMContentLoaded', arguments.callee, false);
},
false
);

})();

2 Replies to “On a lighter note: Count the bugs fixed on Desktopteam Blog”

Leave a Reply

Your email address will not be published. Required fields are marked *