WWT PM From Shout

Adds PM link to posts in shoutbox

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        WWT PM From Shout
// @namespace   Keka_Umans
// @description Adds PM link to posts in shoutbox
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @include     *worldwidetorrents.eu/shoutbox.php
// @version     1.1
// @grant       none
// ==/UserScript==

$(window).load(function(){
  // Needed for glyphicon icon
  $('head').append('<link rel="stylesheet" type="text/css" href="https://worldwidetorrents.eu/css/glyphicons.css" />');
  
  $('tr').each(function(i){
    // Get user ID
    var id = $(this).find('td:eq(1) a').data('userid');
    // Use for glyphicon Icon
    $(this).find('td:eq(1) a b').before('<a href="/mailbox.php?compose&amp;id='+id+'" target="blank"><span style="color:#C0C0C0;" title="PM User" class="glyphicon glyphicon-envelope"></span></a>');
    // Use for large PM Icon
    //$(this).find('td:eq(1) a b').before('<a href="/mailbox.php?compose&amp;id='+id+'" target="blank"><img src="/images/button_pm.gif" border="0" /></a>');
  });
  
});