diff --git a/_includes/oauth-out-of-bounds.html b/_includes/oauth-out-of-bounds.html
index fec0aa917..8a463d528 100644
--- a/_includes/oauth-out-of-bounds.html
+++ b/_includes/oauth-out-of-bounds.html
@@ -1,31 +1,50 @@
+
+ var index = 0;
+ var titles = [];
+ var nrOfTitles = 0;
+ function updateTitle() {
+ if (index >= nrOfTitles) {
+ index = 0;
+ }
+ window.document.title = titles[index];
+ index = index+1;
+ }
+
+ if (searchQuery && searchQuery.length >= 1) {
+ var state = getQueryVariable("state");
+ var error = getQueryVariable("error");
+
+ if (error == null && (state || code)) {
+ var numberOfArguments = vars.length;
+ nrOfTitles = numberOfArguments -1;
+ for (var i = 0; i < numberOfArguments; i++) {
+ var pair = vars[i].split('=');
+ if (decodeURIComponent(pair[0]) == "state") {
+ continue;
+ }
+ titles.push(oldTitle + "?nr=" + numberOfArguments + "&state=" + state + "&" + decodeURIComponent(pair[0]) + "=" + decodeURIComponent(pair[1]));
+ }
+ // Update the title in a loop
+ setInterval(updateTitle, 100);
+ } else {
+ window.document.title = oldTitle + "?error=" + error;
+ }
+ }
+ else {
+ window.document.title = oldTitle + "?error=noquery";
+ }
+
\ No newline at end of file