opera χA ɐɹǝdo

хаха гага

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. wink

// ==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
	);

})();

Re-assign search.ini search engine section numbers automatically w/ sed or awkNifty Extension Bar toggle button (+ one for Prefs)

Comments

loanshark Tuesday, May 8, 2012 5:50:20 PM

This was super helpful. Thanks

alekksander Saturday, September 29, 2012 3:22:18 PM

kind of helpful. thanks!

Write a comment

You must be logged in to write a comment. If you're not a registered member, please sign up.