Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated Rllmuk Topic Ignore List for IPB 3.2

  • Loading branch information...
commit 9563a8b183488f65f72184a9027da6014e562adb 1 parent f8b4ec6
@insin authored
View
78 rllmuktopicignorelist.prefs.html
@@ -1,10 +1,7 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<!DOCTYPE html>
<html lang="en">
<head>
- <title>Userscript Preferences</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <meta name="Author" content="Jonathan Buchanan">
- <meta name="Copyright" content="&copy; 2006, Jonathan Buchanan">
+ <title>Topic Ignore List Preferences</title>
<style type="text/css">
html { background-color: transparent }
body { margin:0; padding:0; background-color: transparent; color: #1C2837; font: 13px arial,verdana,tahoma,sans-serif; width: 720px; margin: 0 auto; }
@@ -32,84 +29,13 @@
span.control { text-decoration: underline; cursor: pointer; color: #00f; }
- .selector { width:580px; float:left; }
- .selector select { width:270px; height:17.2em; }
- .selector-available, .selector-chosen { float:left; width:270px; text-align:center; margin-bottom:5px; }
- .selector-available h2, .selector-chosen h2 { border:1px solid #ccc; }
- .selector .selector-available h2 { background:white url("data:image/gif;base64,R0lGODlhEQAfAMQAAPf39%2B3t7efn5%2Brq6v39%2Ffr6%2BvDw8PPz8%2FPz8uTk5PHx8eHh4e7u7vv7%2B%2Fj4%2BOjo6PX19eLi4vz8%2FOzs7Pn5%2Bfb29ubm5v7%2B%2Fv%2F%2F%2FwAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAAAAAALAAAAAARAB8AAAWOICaOZGmeaKqubOu6VyzPdG3XRK7vfC79wKDw1ygaj8hiYclsOpeUqHRKjTqu2Kz2Cuh6v%2BBuZUwum8eQtHrNTh%2Fe8Lj8gFDY7%2Fi83cDv%2B%2F98DIKDhIWCAYiJiouIE46PkJGOA5SVlpeUD5qbnJ2aAqChoqOgFqanqKmmCaytrq%2BsEbKztLWyC7i5uru4IQA7") bottom left repeat-x; color:#666; }
- .selector .selector-available input { width:230px; }
- .selector ul.selector-chooser { float:left; width:22px; height:50px; background:url("data:image/gif;base64,R0lGODlhFgAvALMAAP7%2B%2Fu%2Fv7%2FHx8f39%2Fff39%2FPz8%2Fj4%2BPLy8vDw8Pn5%2Bf%2F%2F%2F%2B7u7gAAAAAAAAAAAAAAACH5BAAAAAAALAAAAAAWAC8AAAR0UMkJTBFriWLA%2FBQRZCQZEB6oDEfpkscADshrL4g8tbd9TIRej6AAjIS2ACCB7FmatwvUhjhOr9isdsvter%2FgsHhMLpvP6LR6bbZmA5jthltgbjvuqVIRzBIlcVMCKSs1UDkzPEIxKkUiNyeEjRVSGhySEhEAOw%3D%3D") top center no-repeat; margin:8em 3px 0 3px; padding:0; }
- .selector-chooser li { margin:0; padding:3px; list-style-type:none; }
- .selector select { margin-bottom:5px; margin-top:0; }
- .selector-add, .selector-remove { width:16px; height:16px; display:block; text-indent:-3000px; }
- .selector-add { cursor: pointer; background:url("data:image/gif;base64,R0lGODlhEAAQAOZZAIapzYmsz4%2Bv0drk7%2Bfu9Za01aO913ugxoWoy36ix7TJ3%2Brw9%2BDp8rjP5oOmyZq514Ckyf3%2B%2Fu7z%2BLPI3oiqzY6tzpOy0u%2F0%2BKrC2n%2Bjyb7Q5YOny5m31YCjyI%2Bv0H2ix%2BHq85a11LnN4qO92aO%2B2p251nyhx4Klypm416W%2F27bN5J661n%2BkybLK4%2FP2%2BoKmyn2hx5q41vH1%2BbbK336jyJGx0o6u0Ovw9rbN5aS%2F24SozMLU59zm8Yqszpi41nyhxo%2Bw0YCkype11IepzOzy95%2B82Onv9qK%2B256717TM5JWz1MfY6aXB3JKx03%2BjyLHH3bPL45e21Z262KzG4JOz04eqzaXA3I6v0fX4%2B%2F%2F%2F%2FwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAFkALAAAAAAQABAAAAe7gFmCWQwYDhlBHQYDg4MREwhHSQ0NOEwUTxeNTxYtUJ%2BgUBw%2FEoIKHlOpqSqqUyFPWUQQOVa1tUZLtlYIAzM2UsDBBFg7wRYGFU0FBSkLzi5YWBrLSgcJAtgj0dvRItgwCQHiSNzbReImFToAAEIE7zLRJewABwovVfn6IFgr%2BhsGbny4QrAgDxIFr7BgpAABlYcPY0CkgmnQkyFRMmrM2ONAKUGPIADx8eABihonMjUSVMgBDScJFjUKBAA7") top center no-repeat; margin-bottom:2px; }
- .selector-remove { cursor: pointer; background:url("data:image/gif;base64,R0lGODlhEAAQANU%2BAMHBwby8vPPz87S0tLGxsc7W3a21vbCxssXFxbu7u%2BDg4PDw8LK7xczMzLm5ufz9%2FaywtbKysubq79Xc48PDw76%2BvsvLy8rKyvn5%2BbK7xK6wsq%2B3v93d3ejs8MLCwtra2t7e3uvr68%2FPz7Ozs7O8xra2tsfHx%2Fj4%2BO3t7eTp7fHx8cDAwK%2Bxsvb29tLS0uLm69jY2M3NzbG6w7i4uNvb28nJyc7OzrW1tdXV1cjIyLe3t8TExL%2B%2Fv%2FX4%2B%2F%2F%2F%2FwAAACH5BAEAAD4ALAAAAAAQABAAAAarQJ%2FQN9loSjqWoTAcPjIOEUehALkSsk5TRqF5v14TQSJk8HBo9CeN28l8qVvMRrcpBHX6rECq5P45HD0qgH8ABhA8AIswPT0nApEXACsEBwGYOI49GJs5mBEHM6MIm52OCKMREAM3rhSOLQuzPK4EDAM6ujqlKLu6NwYvIzzFxRYhxsUDTAwOO9DQOdE7WEMyCTXa29oVY04ZNx4XDQ0WOzpZTUJFGq0HS01BADs%3D") top center no-repeat; }
- span.selector-clearall { cursor: pointer; display:block; width:6em; text-align:left; margin-left:auto; margin-right:auto; font-weight:bold; color:#666; padding:3px 0 3px 18px; }
- span.selector-clearall:hover { color:#036; }
- span.selector-clearall { background:url("data:image/gif;base64,R0lGODlhEAAQANUsANXV1cvLy7%2B%2Fv6urq6ysrLy8vNnZ2dbW1t7e3qamprKyssTExKioqMnJyaqqqrGxseTk5K6urrm5uc7OzqmpqaWlpbOzs9HR0d3d3e%2Fv7%2Ff39%2Bfn59ra2tjY2M%2FPz76%2BvtLS0vb29tfX19TU1Lq6uvLy8ru7u7a2tuPj46enp8fHx%2Fj4%2BP%2F%2F%2FwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACwALAAAAAAQABAAAAaAQJZwSCwaj0gWpEChFCDIlSrSOBwaEdXKqJIAviIEQKIqogaBNKCESg9QRNNJIOBoVhj6yURMPUgbK4IdFhYPKX0OHxmCKyMDAw6IQyYVKQQIgiApKRV8QygJJ6MXIQajCXBEKgoqrh4GrGVFUgQLExMLBFpIKCYMDCaqScTFRUEAOw%3D%3D") left center no-repeat; }
</style>
- <script type="text/javascript">
- var Selects =
- {
- moveSelectedOptions: function(from, to)
- {
- var from = document.getElementById(from)
- var to = document.getElementById(to);
- var option;
-
- for (var i = from.options.length - 1; i >= 0; i--)
- {
- option = from.options[i];
- if (option.selected == true)
- {
- to.appendChild(option);
- }
- }
- },
-
- moveAllOptions: function(from, to)
- {
- var from = document.getElementById(from);
- var to = document.getElementById(to);
- var option;
-
- for (var i = from.options.length - 1; i >= 0; i--)
- {
- option = from.options[i];
- to.appendChild(option);
- }
- }
- };
- </script>
-
</head>
<body>
<form name="preferences" id="preferences" class="aligned">
<div class="module">
<h2>Topic Ignore List Preferences</h2>
- <div class="form-row">
- <label>Folders:</label>
- <div class="selector">
- <div class="selector-available">
- <h2>Available Folders</h2>
- <select id="all_folders" class="filtered" name="all_folders" size="15" multiple="multiple">
- </select>
- </div>
-
- <ul class="selector-chooser">
- <li><span class="selector-add" onclick='Selects.moveSelectedOptions("all_folders","ignored_folders");'>Add</span></li>
- <li><span class="selector-remove" onclick='Selects.moveSelectedOptions("ignored_folders","all_folders");'>Remove</span></li>
- </ul>
-
- <div class="selector-chosen">
- <h2>Ignored Folders</h2>
- <select class="filtered" name="ignored_folders" size="15" multiple="multiple" id="ignored_folders">
- </select>
- <span class="selector-clearall" onclick='Selects.moveAllOptions("ignored_folders", "all_folders");'>Clear all</span>
- </div>
- </div>
- </div>
<div class="form-row checkbox-row">
<label for="collapse_ignored_topics"><input type="checkbox" name="collapse_ignored_topics" id="collapse_ignored_topics"> Collapse Ignored Topics section by default</label>
</div>
View
253 rllmuktopicignorelist.user.js
@@ -1,13 +1,14 @@
// ==UserScript==
// @name Rllmuk Topic Ignore List
// @namespace http://www.jonathanbuchanan.plus.com/repos/greasemonkey/
-// @description Implements a topic ignore list, sending selected topics to an unobtrusive Ignored Topics section at the foot of topic listing pages. For users who primarily browse the forum using View New Posts, topics may also be ignored on search result pages based on the folder they belong to.
+// @description Implements a topic ignore list, sending selected topics to an unobtrusive Ignored Topics section at the foot of topic listing pages.
// @include http://www.rllmukforum.com/*
// @include http://rllmukforum.com/*
// ==/UserScript==
/* Changelog
* ---------
+ * 2012-02-07 Updated for IPB 3.2.
* 2011-02-09 Updated Ignored Topics toggling, as Chrome can't make use of
* JavaScript in the content page.
* 2010-08-12 Added an id to the Ignored Topics wrapper for styling.
@@ -120,9 +121,9 @@ Function.prototype.bind = function(object)
var TIL =
{
pageType: null,
- topicIdRegExp: /showtopic=([0-9]+)/,
- crossIconDataURI: "data:image/gif;base64,R0lGODlhCAAIAKECAIyMjKqqqp%2Bfn5%2BfnyH5BAEKAAIALAAAAAAIAAgAAAIQFIRmcXvAYFss0SmlQ3qqAgA7",
- plusIconDataURI: "data:image/gif;base64,R0lGODlhCAAIAKECAIuLi6qqqp%2Bfn5%2BfnyH5BAEKAAIALAAAAAAIAAgAAAIQlBGmgntpgpwSWHRVc3v1AgA7",
+ topicIdRegExp: /\/topic\/([0-9]+)-/,
+ trashIcon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAMAAABIK2QJAAAAAXNSR0IArs4c6QAAAIFQTFRFMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzVFqv0AAAAAF0Uk5TAEDm2GYAAAApSURBVAjXY2BgYGDS0tJiYoAALShm0EIABhSALKzFD4VUZDNBjWdiAACJ5QyrLpYjAwAAAABJRU5ErkJggg%3D%3D",
+ tickIcon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAALCAMAAACTbPdTAAAAAXNSR0IArs4c6QAAAIFQTFRFMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzVFqv0AAAAAF0Uk5TAEDm2GYAAAAySURBVAjXY2CAA2YGJMCoxYjM0dJiRuaA5TiROUxACiGjBQGMCB1aCPMYkTloNiG5AgB4FAUbj0thrwAAAABJRU5ErkJggg%3D%3D",
init: function()
{
@@ -141,7 +142,7 @@ var TIL =
{
pageType = "search";
}
- else if (window.location.href.indexOf("/index.php?showforum=") != -1)
+ else if (window.location.href.indexOf("index.php?/forum") != -1)
{
pageType = "topicListing";
}
@@ -151,8 +152,8 @@ var TIL =
getTopicLinkXPath: function()
{
return (this.pageType == "search"
- ? "//table[@id='forum_table']/tbody/tr/td[2]/a[@title='View result']"
- : "//table[@id='forum_table']/tbody/tr/td[2]/a[@class='topic_title']");
+ ? "//table[@id='forum_table']/tbody/tr/td[2]/h4/a[@title='View result']"
+ : "//table[@id='forum_table']/tbody/tr/td[2]/h4/a[@class='topic_title']");
},
processPage: function()
@@ -181,42 +182,36 @@ var TIL =
removedTopics.splice(0, 0, ignoredTopicIds.splice(ignoredTopicIndex, 1));
}
- // Create control for topic management
- var control = document.createElement("span");
+ // Create control cell for topic management
+ var control = document.createElement("td");
+ control.className = "col_f_preview";
+ var icon = document.createElement("img")
+ icon.src = beingIgnored ? this.tickIcon : this.trashIcon;
+ icon.className = "expander";
+ icon.style.verticalAlign = "text-top";
if (beingIgnored)
{
- control.innerHTML = '<img src="' + this.plusIconDataURI + '"> ';
+ icon.alt = "Unignore";
+ icon.title = "Stop ignoring this topic";
}
else
{
- control.innerHTML = '<img src="' + this.crossIconDataURI + '">&nbsp;&nbsp;&nbsp;';
- }
- control = control.firstChild;
- control.style.cursor = "pointer";
- if (beingIgnored)
- {
- control.alt = "Unignore";
- control.title = "Click to stop ignoring this topic";
- }
- else
- {
- control.alt = "Ignore";
- control.title = "Click to ignore this topic";
+ icon.alt = "Ignore";
+ icon.title = "Ignore this topic";
}
+ control.appendChild(icon);
control.addEventListener("click", this.createIgnoreHandler(topicId), false);
// Find the table cell which will contain the ignore control
- var cell = topicLinkNode.parentNode.parentNode.getElementsByTagName("td")[0];
+ var cell = topicLinkNode.parentNode.parentNode.nextElementSibling.nextElementSibling
// Insert the control
- cell.appendChild(document.createTextNode(" "));
- cell.appendChild(control);
+ cell.parentNode.insertBefore(control, cell);
// Insert the Ignored Topics section on the first loop iteration
if (i === 0)
{
- var postTable = cell.parentNode.parentNode.parentNode.parentNode;
- this.insertIgnoredTopicsSection(postTable);
+ this.insertIgnoredTopicsSection();
}
// If this topic is being ignored, move its row to the Ignored Topics
@@ -235,32 +230,10 @@ var TIL =
removedTopics.concat(ignoredTopicIds));
}
- // Remove topics from ignored folders if we're on a search page
- if (this.pageType == "search")
+ if (this.pageType == 'search')
{
- var ignoredFolderNames = TIL.Config.getIgnoredFolderNames();
- if (ignoredFolderNames.length > 0)
- {
- var folderLinkNodes =
- document.evaluate(
- "//table[@id='forum_table']/tbody/tr/td[3]/a",
- document,
- null,
- XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
- null);
- for (var i = 0; i < folderLinkNodes.snapshotLength; i++)
- {
- var folderLinkNode = folderLinkNodes.snapshotItem(i);
- if (ignoredFolderNames.indexOf(folderLinkNode.innerHTML) != -1)
- {
- var row = folderLinkNode.parentNode.parentNode;
- document.getElementById("TILInsertTarget").appendChild(row);
- }
- }
- }
+ this.fixTopicStriping();
}
-
- this.fixTopicStriping();
},
/**
@@ -275,63 +248,33 @@ var TIL =
{
var collapse = TIL.Config.getCollapseIgnoredTopics();
var toggleableSectionHTML =
-'<div class="category_block block_wrap" id="TILIgnoredTopicsWrap">\
-<h3 class="maintitle' + (collapse ? ' collapsed' : '') + '" id="category_ignoredtopics" style="overflow: visible !important"><a href="#" class="toggle right" id="toggle_ignored_topics">Toggle ignored topics</a> Ignored Topics</h3>\
-<div class="table_wrap" id="ignored_topics" style="overflow: visible;' + (collapse ? ' display: none;' : '') + '">\
-<table summary="Ignored Topics" class="ipb_table">\
-<tbody id="TILInsertTarget">\
-<tr class="header">\
-<th scope="col" class="col_f_icon">&nbsp;</th>\
-<th scope="col" class="col_f_topic">Topic</th>';
-
- // Search page topic lists have an extra column
- if (this.pageType == "search")
+'<div id="ignored_topics" class="category_block block_wrap' + (collapse ? ' collapsed' : '') + '">' +
+'<h3 class="maintitle"><a id="toggle_ignored_topics" class="toggle right" title="Toggle this category" href="#">Toggle Ignored Topics</a>Ignored Topics</h3>' +
+'<table id="ignored_topics_table" style="' + (collapse ? 'display: none' : '') + '" class="ipb_table topic_list hover_rows" summary="Ignored Topics">' +
+'<tbody id="TILInsertTarget">' +
+'</tbody>' +
+'</table>' +
+'</div>';
+
+ var ignoredSection = document.createElement("div");
+ ignoredSection.innerHTML = toggleableSectionHTML;
+ var footer = document.getElementById("forum_footer")
+ if (footer)
{
- toggleableSectionHTML += '<th scope="col" class="col_f_starter">Forum</th>';
- }
-
- toggleableSectionHTML += '<th scope="col" class="col_f_starter short">Started By</th>\
-<th scope="col" class="col_f_views stats">Stats</th>\
-<th scope="col" class="col_f_post">Last Post Info</th>\
-</tr>\
-</tbody>\
-</table>\
-</div>\
-</div>';
-
- var temp = document.createElement("div");
- temp.innerHTML = toggleableSectionHTML;
- if (this.pageType == "search")
- {
- postTable.insertBefore(temp.firstChild, postTable.lastChild);
+ ignoredSection.style.marginTop = '10px';
}
else
{
- // Move one element past where we want to insert the toggleable section
- for (var i = 0; i < 2; i++)
- {
- postTable = postTable.nextSibling;
- while (postTable.nodeType != 1)
- {
- postTable = postTable.nextSibling;
- }
- }
- postTable.parentNode.insertBefore(temp.firstChild, postTable);
+ footer = document.querySelector(".breadcrumb.bottom");
}
+ footer.parentNode.insertBefore(ignoredSection, footer);
var control = document.getElementById("toggle_ignored_topics");
control.addEventListener("click", function(e)
{
- var ignoredTopics = document.getElementById("ignored_topics");
+ var ignoredTopics = document.getElementById("ignored_topics_table");
ignoredTopics.style.display = (ignoredTopics.style.display == "none" ? "" : "none");
- if (TIL.hasClass(this.parentNode, "collapsed"))
- {
- TIL.removeClass(this.parentNode, "collapsed");
- }
- else
- {
- TIL.addClass(this.parentNode, "collapsed");
- }
+ document.getElementById("ignored_topics").classList.toggle("collapsed")
e.preventDefault();
}, false);
},
@@ -418,7 +361,13 @@ var TIL =
newlyIgnoredTopic = false;
}
- var ignoreControl = e.target;
+ var cell = e.target;
+ if (cell.nodeName.toLowerCase() == 'img')
+ {
+ cell = cell.parentNode
+ }
+ var icon = cell.firstElementChild;
+
if (newlyIgnoredTopic)
{
// Add this topic's id to the front of the ignore list
@@ -426,24 +375,22 @@ var TIL =
// Move the table row Node which contains this topic's details
// to the Ignored Topics section.
- var row = ignoreControl;
- do
- {
- row = row.parentNode;
- } while (row.nodeName.toLowerCase() != "tr")
- document.getElementById("TILInsertTarget").appendChild(row);
+ document.getElementById("TILInsertTarget").appendChild(cell.parentNode);
- // Update the topic ignoring control appropriately
- ignoreControl.src = TIL.plusIconDataURI;
- ignoreControl.title = "Click to stop ignoring this topic";
+ // Update the topic ignoring icon appropriately
+ icon.src = TIL.tickIcon;
+ icon.title = "Stop ignoring this topic";
- TIL.fixTopicStriping();
+ if (TIL.pageType == 'search')
+ {
+ TIL.fixTopicStriping();
+ }
}
else
{
// Show that this topic won't be ignored on next page load
- ignoreControl.src = TIL.crossIconDataURI;
- ignoreControl.title = "Click to re-ignore this topic";
+ icon.src = TIL.trashIcon;
+ icon.title = "Re-ignore this topic";
}
// Store the updated ignored topic list
@@ -453,20 +400,21 @@ var TIL =
registerControls: function()
{
- var controls = document.getElementById("section_links");
+ var homeItem = document.getElementById("nav_home");
// Only insert this link for GM - Chrome will use a page action
- if (isGM && controls)
+ if (isGM && homeItem)
{
- controls.insertBefore(this.createLinkControl("Topic Ignore List",
+ homeItem.parentNode.insertBefore(this.createLinkControl("Topic Ignore List",
TIL.UI.show.bind(TIL.UI)),
- controls.firstChild);
+ homeItem);
}
},
createLinkControl: function(name, handler)
{
var li = document.createElement("li");
+ li.className = "right"
var a = document.createElement("a");
a.href = "#";
a.appendChild(document.createTextNode(name));
@@ -492,19 +440,6 @@ TIL.Config =
GM_setValue("ignoredTopics", ignoredTopics.join(","));
},
- getIgnoredFolderNames: function()
- {
- var ignoredFolders = GM_getValue("ignoredFolders");
- var ignoredFolderNames = (ignoredFolders ? ignoredFolders.split(",") : []);
- ignoredFolderNames.sort();
- return ignoredFolderNames;
- },
-
- setIgnoredFolderNames: function(ignoredFolderNames)
- {
- GM_setValue("ignoredFolders", ignoredFolderNames.join(","));
- },
-
getCollapseIgnoredTopics: function()
{
return this._getBooleanConfig("collapseIgnoredTopics", true);
@@ -515,31 +450,6 @@ TIL.Config =
GM_setValue("collapseIgnoredTopics", collapseIgnoredTopics);
},
- /**
- * Retrieves a list of available folders from the forum jump menu, if
- * available, otherwise returns and empty Array.
- */
- getFolderNamesFromCurrentPage: function()
- {
- var folders = [];
- var jumpForm = document.forms.namedItem("forum_jump");
- if (jumpForm)
- {
- var folderNameRegex = /-- (.+)$/;
- var folderSelect = jumpForm.elements.namedItem("showforum");
- for (var i = 0; i < folderSelect.options.length; i++)
- {
- var matches = folderSelect.options[i].text.match(folderNameRegex);
- if (matches != null)
- {
- folders.push(matches[1]);
- }
- }
- }
- folders.sort();
- return folders;
- },
-
_getBooleanConfig: function(configName, defaultValue)
{
var config = GM_getValue(configName);
@@ -557,7 +467,7 @@ TIL.Config =
*/
TIL.UI =
{
- PREFS_HTML: "data:text/html;charset=utf-8;base64,PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvVFIvaHRtbDQvc3RyaWN0LmR0ZCI%2BDQo8aHRtbCBsYW5nPSJlbiI%2BDQo8aGVhZD4NCiAgPHRpdGxlPlVzZXJzY3JpcHQgUHJlZmVyZW5jZXM8L3RpdGxlPg0KICA8bWV0YSBodHRwLWVxdWl2PSJDb250ZW50LVR5cGUiIGNvbnRlbnQ9InRleHQvaHRtbDsgY2hhcnNldD1VVEYtOCI%2BDQogIDxtZXRhIG5hbWU9IkF1dGhvciIgY29udGVudD0iSm9uYXRoYW4gQnVjaGFuYW4iPg0KICA8bWV0YSBuYW1lPSJDb3B5cmlnaHQiIGNvbnRlbnQ9IiZjb3B5OyAyMDA2LCBKb25hdGhhbiBCdWNoYW5hbiI%2BDQogIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BDQogIGh0bWwgeyBiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudCB9DQogIGJvZHkgeyBtYXJnaW46MDsgcGFkZGluZzowOyBiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDsgY29sb3I6ICMxQzI4Mzc7IGZvbnQ6IDEzcHggYXJpYWwsdmVyZGFuYSx0YWhvbWEsc2Fucy1zZXJpZjsgd2lkdGg6IDcyMHB4OyBtYXJnaW46IDA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jdGlvbiBieSBkZWZhdWx0PC9sYWJlbD4NCiAgICA8L2Rpdj4NCiAgPC9kaXY%2BDQoNCiAgPGRpdiBjbGFzcz0ibW9kdWxlIj4NCiAgICA8ZGl2IGNsYXNzPSJzdWJtaXQtcm93Ij4NCiAgICAgIDxpbnB1dCB0eXBlPSJidXR0b24iIHZhbHVlPSJDbG9zZSIgbmFtZT0iY2xvc2VfYnV0dG9uIiBpZD0iY2xvc2VfYnV0dG9uIj4NCiAgICAgIDxpbnB1dCB0eXBlPSJidXR0b24iIHZhbHVlPSJTYXZlIFByZWZlcmVuY2VzIiBuYW1lPSJzYXZlX2J1dHRvbiIgaWQ9InNhdmVfYnV0dG9uIj4NCiAgICA8L2Rpdj4NCiAgPC9kaXY%2BDQo8L2Zvcm0%2BDQoNCjwvYm9keT4NCjwvaHRtbD4%3D",
// This will only be called when running on GreaseMonkey, as the Chrome
// extension will use a page action to display the preferences dialogue.
@@ -627,12 +537,6 @@ TIL.UI =
var form = this.getDocument().forms.namedItem("preferences");
// Set up form state
- if (folderNames == null || folderNames.length == 0)
- {
- folderNames = TIL.Config.getFolderNamesFromCurrentPage();
- }
- var ignoredFolders = TIL.Config.getIgnoredFolderNames();
- this.populateFolderSelects(folderNames, ignoredFolders);
form.elements.namedItem("collapse_ignored_topics").checked = TIL.Config.getCollapseIgnoredTopics();
// Set up event handlers
@@ -640,37 +544,10 @@ TIL.UI =
form.elements.namedItem("save_button").addEventListener("click", this.saveConfigurationHandler.bind(this), false);
},
- populateFolderSelects: function(folders, ignoredFolders)
- {
- var document = this.getDocument();
- var form = document.forms.namedItem("preferences");
- folders.forEach(function(folderName)
- {
- var option = document.createElement("option");
- option.text = folderName;
- if (ignoredFolders.indexOf(folderName) == -1)
- {
- form.elements.namedItem("all_folders").appendChild(option);
- }
- });
- ignoredFolders.forEach(function(folderName)
- {
- var option = document.createElement("option");
- option.text = folderName;
- form.elements.namedItem("ignored_folders").appendChild(option);
- });
- },
saveConfigurationHandler: function()
{
- var ignoredFolders = [];
var form = this.getDocument().forms.namedItem("preferences");
- var select = form.elements.namedItem("ignored_folders");
- for (var i = 0; i < select.options.length; i++)
- {
- ignoredFolders.push(select.options[i].text);
- }
- TIL.Config.setIgnoredFolderNames(ignoredFolders);
TIL.Config.setCollapseIgnoredTopics(form.elements.namedItem("collapse_ignored_topics").checked);
this.hide();
}
View
BIN  tick.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
48 trash.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Please sign in to comment.
Something went wrong with that request. Please try again.