Fix features in thread lists

Due to an update in the HTML structure of thread lists, many features
stopped working properly. This CL fixes these issues.

In the case of the "reduce whitespace" option, the thread list styles
applied in small screens have been temporarily removed since they have
to be fixed still.

Bug: twpowertools:138
Change-Id: Icf6d74f8a579fedb6af65f44864bd6f744098f2a
diff --git a/src/injections/batchLock.js b/src/injections/batchLock.js
index 6b45cdd..4fb3af8 100644
--- a/src/injections/batchLock.js
+++ b/src/injections/batchLock.js
@@ -109,17 +109,21 @@
   var authuser = getAuthUser();
 
   checkboxes.forEach(checkbox => {
-    var url = recursiveParentElement(checkbox, 'A').href;
+    var url = recursiveParentElement(checkbox, 'EC-THREAD-SUMMARY')
+                  .querySelector('a.header-content')
+                  .href;
     var thread = parseUrl(url);
     if (thread === false) {
       console.error('Fatal error: thread URL ' + url + ' could not be parsed.');
       return;
     }
-    CCApi('SetThreadAttribute', {
-      1: thread.forum,
-      2: thread.thread,
-      3: (action == 'lock' ? 1 : 2),
-    }, /* authenticated = */ true, authuser)
+    CCApi(
+        'SetThreadAttribute', {
+          1: thread.forum,
+          2: thread.thread,
+          3: (action == 'lock' ? 1 : 2),
+        },
+        /* authenticated = */ true, authuser)
         .then(() => {
           addLogEntry(true, action, url, thread.thread);
         })