NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name spaces get thread name btn
// @namespace spac
// @version 1
// @description spaces script
// @include http://spaces.ru/*
// @include https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js
// @version 1
// @grant none
// ==/UserScript==
$("head").append($('<link rel="stylesheet" href="http://7kill.byethost5.com/spaces_style.css">'));
$(document).ready(function(){
var threadName;
var threadLink;
$('<button id="gen_btn">Gen</button>').appendTo($('.sep_bl').eq(0));
$('<textarea id="resul"></textarea>').prependTo("body");
$('#gen_btn').click(function(){
threadName = $('.overfl_hid>b').text();
threadLink = $(location).attr('href');
var arr = threadLink.split('&');
var readyLink = 'http://spaces.ru/forums/?';
readyLink += arr[1]
var res = ('[url=' + readyLink + ']' + threadName + '[/url]');
$('#resul').val($('#resul').val() + res + "\n");
});
});