// @namespace org.free.for.all
// @require http://code.jquery.com/jquery-latest.min.js
// @include /^https?://debianforum\.de/forum/viewtopic\.php.*
+// @include /^https?://heimdall/qi/boards/fuckyou/viewtopic\.php.*/
// @author Thorsten Sperber
-// @version 0.2
+// @version 0.2.2
// ==/UserScript==
_log = console.log;
-ARCHIVFORUMID = 12;
-boardurl = "/";
+ARCHIVFORUMID = 35;
+boardurl = "/forum/";
+user_id = "18865";
function get_post_id(_this) {
var thread_id = get_thread_id();
_log(this);
- var url = boardurl + "/mcp.php?&f=" + get_forum_id() + "&t=" + thread_id + "&i=main&mode=topic_view&action=split&start=0";
+ var url = boardurl + "mcp.php?&f=" + get_forum_id() + "&t=" + thread_id + "&i=main&mode=topic_view&action=split&start=0";
var data = {
"action": "split_all",
"icon": "1",
"to_forum_id": ARCHIVFORUMID,
"to_topic_id": "0",
};
- _log(data)
$.ajax(
{
type: 'POST',
},
success: function(data, status) {
key = data.match("confirm_key=([A-Z0-9]+)")[1];
- _log(key);
_removepost(post_id, key);
}
}
}
function _removepost(post_id, confirm_key) {
var thread_id = get_thread_id();
- url = boardurl + "/mcp.php?action=split&f=" + get_forum_id() + "&i=main&mode=topic_view&start=0&t=" + thread_id + "&confirm_key=" + confirm_key;
+ url = boardurl + "mcp.php?action=split&f=" + get_forum_id() + "&i=main&mode=topic_view&start=0&t=" + thread_id + "&confirm_key=" + confirm_key;
data = {
"action": "split_all",
- "confirm": "Yes",
- "confirm_uid": "2",
+ "confirm": "Ja",
+ "confirm_uid": user_id,
"f": "0",
"i": "main",
"icon": "1",
"redirect": "/",
"sess": get_session_id(),
"start": "0",
- "subject": "[spam] " + $('.topic-title a').text(),
+ "subject": "[spam] " + $('#page-body h2').text(),
"t": thread_id,
"to_forum_id": ARCHIVFORUMID
}
);
}
-$('.locked-icon').remove();
-$(".post-buttons").off('click');
-$(".post-buttons").append('<li>').append('<a class="button icon-button locked-icon" name="spampost" title="Cut this shit">').on('click', removepost);
+
+$(".postbody .profile-icons .droppost").off('click');
+li = $("<li class='droppost'>");
+li.css("background-image", 'url("/forum/styles/debianforum/imageset/topic_read_locked.gif")');
+li.css("background-repeat", "no-repeat");
+li.css("height", "27px");
+li.css("width", "27px");
+li.on('click', removepost);
+$(".postbody .profile-icons").prepend(li);
+
+
+li.html('<a class="button icon-button locked-icon" name="spampost" title="Cut this shit"> </a>').on('click', removepost);