From b25e4e93bd31340c0b4da4917d115416dadbd651 Mon Sep 17 00:00:00 2001 From: Thorsten S Date: Wed, 24 Dec 2014 12:56:30 +0100 Subject: [PATCH] some fixes on dfde theme --- quickmod.user.js | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/quickmod.user.js b/quickmod.user.js index 33d3d88..e2c40aa 100644 --- a/quickmod.user.js +++ b/quickmod.user.js @@ -3,13 +3,15 @@ // @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) { @@ -33,7 +35,7 @@ function removepost(event) { 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", @@ -48,7 +50,6 @@ function removepost(event) { "to_forum_id": ARCHIVFORUMID, "to_topic_id": "0", }; - _log(data) $.ajax( { type: 'POST', @@ -60,7 +61,6 @@ function removepost(event) { }, success: function(data, status) { key = data.match("confirm_key=([A-Z0-9]+)")[1]; - _log(key); _removepost(post_id, key); } } @@ -70,11 +70,11 @@ function removepost(event) { } 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", @@ -83,7 +83,7 @@ function removepost(event) { "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 } @@ -99,7 +99,16 @@ function removepost(event) { ); } -$('.locked-icon').remove(); -$(".post-buttons").off('click'); -$(".post-buttons").append('
  • ').append('').on('click', removepost); + +$(".postbody .profile-icons .droppost").off('click'); +li = $("
  • "); +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(' ').on('click', removepost); -- 2.39.2