// ==UserScript==
// @name KAT [katcr.co] - Default values for Uploads
// @namespace NotNeo
// @description Lets you set up defaults in the "Regular Upload" section of KAT (custom default description for every category)
// @include http*://katcr.co/new/torrents-upload.php
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @version 1
// @grant none
// ==/UserScript==
//"Default" of course means that you can change everything in the "upload torrent" section normally, the values just start out with these settings.
//--------------------------------
//------------Settings------------
var dName = ""; //put your default name between the quotes. For no default/empty, leave no spaces between the quotes ("") (doublequotes(") inside the name need to be escaped. Check Description tips below)
var dCategory = 0; //replace the number with the id number for your default category (Find yours below, remember CTRL+F)
var dLanguage = 1; //replace the number with the id number for your default language (Find yours below, remember CTRL+F)
var dDesc = ""; //put your default description between the quotes. For no default/empty, leave no spaces between the quotes (""). (doublequotes(") inside the description need to be escaped. Check tips below)
/*Tips for more complicated descriptions:
- To put text on a new line use the newline character(\n).
This is the firstline.\nThis is the second line.
- To use duoblequotes(") in your desription, you must "escape them", meaning you need to use the escape character(\) in front of them. (the escape characters won't actually show up in the description)
\"this\" will work
"this" will not
Example:
var dDesc = "[center][img]https://i.imgur.com/example.jpg[/img]\nSo this is a test\n\nThis should work.\n\"Quotes\" work like this.[/center]\n:smile";
You can create default descriptions for as many categories as you wish.
Changing the category will insert the default description for that category in to the description box, so make sure you choose the category BEFORE you start editing the description! */
//Remind me? yes/no
var reminder = "yes"; /* (red text next to category)
These take priority over the global default description.
Simply type the description between the quotes on the line corresponding to your category id. */
var desc = [
"", // 0
"", // 1
"", // 2
"", // 3
"", // 4
"", // 5
"", // 6
"", // 7
"", // 8
"", // 9
"", // 10
"", // 11
"", // 12
"", // 13
"", // 14
"", // 15
"", // 16
"", // 17
"", // 18
"", // 19
"", // 20
"", // 21
"", // 22
"", // 23
"", // 24
"", // 25
"", // 26
"", // 27
"", // 28
"", // 29
"", // 30
"", // 31
"", // 32
"", // 33
"", // 34
"", // 35
"", // 36
"", // 37
"", // 38
"", // 39
"", // 40
"", // 41
"", // 42
"", // 43
"", // 44
"", // 45
"", // 46
"", // 47
"", // 48
"", // 49
"", // 50
"", // 51
"", // 52
"", // 53
"", // 54
"", // 55
"", // 56
"", // 57
"", // 58
"", // 59
"", // 60
"", // 61
"", // 62
"", // 63
"", // 64
"", // 65
"", // 66
"", // 67
"", // 68
"", // 69
"", // 70
"", // 71
"", // 72
"", // 73
"", // 74
"", // 75
"", // 76
"", // 77
"", // 78
"", // 79
"", // 80
"", // 81
"", // 82
"", // 83
"", // 84
"", // 85
"", // 86
"", // 87
"", // 88
"", // 89
"", // 90
"", // 91
"", // 92
"", // 93
"", // 94
"", // 95
"", // 96
"", // 97
"", // 98
"", // 99
"", // 100
"", // 101
"", // 102
"", // 103
"", // 104
"", // 105
"", // 106
"", // 107
"", // 108
"", // 109
"", // 110
"", // 111
"", // 112
"", // 113
"", // 114
"", // 115
"", // 116
"", // 117
"", // 118
"", // 119
"", // 120
"", // 121
"", // 122
"", // 123
"", // 124
"", // 125
"", // 126
"", // 127
"", // 128
"", // 129
"", // 130
"", // 131
"", // 132
"", // 133
"", // 134
"", // 135
"", // 136
"", // 137
"", // 138
"", // 139
"", // 140
"", // 141
"", // 142
"", // 143
"", // 144
"", // 145
"", // 146
"", // 147
"", // 148
"", // 149
"", // 150
"", // 151
"", // 152
"", // 153
"", // 154
"", // 155
];
//-------------------------------
//-------------------------------
//Do not edit anything below this line
$( document ).ready(function() {
if (reminder == "yes") {
$("[name='type']").parent().find("br").remove();
$("[name='type']").parent().append(" <span style='color:red'><= Choose before editing the description</span> ");
}
$("[name='name']").val(dName);
$("[name='type']").val(dCategory);
$("[name='lang']").val(dLanguage);
$("[name='descr']").val(dDesc);
descriptionChanger();
$("[name='type']").change(function() {
descriptionChanger();
});
});
function descriptionChanger() {
for (i = 0; i < 156; i++) {
if ($("[name='type']").val() == i && desc[i] !== "") {
$("[name='descr']").val(desc[i]);
}
}
}
/* Categories:
<option value="0"> Select Cat </option>
<optgroup label="Anime">
<option value="118">English Translated</option>
<option value="133">Other</option>
</optgroup><optgroup label="Applications">
<option value="131">Other</option>
<option value="139">Windows</option>
<option value="140">Mac</option>
<option value="142">Linux</option>
<option value="144">Handheld</option>
</optgroup><optgroup label="Books">
<option value="102">Children</option>
<option value="103">Comics</option>
<option value="104">Manga</option>
<option value="105">Magazines</option>
<option value="106">Textbooks</option>
<option value="107">Fiction</option>
<option value="108">Non-fiction</option>
<option value="109">Audio books</option>
<option value="110">Biography</option>
<option value="111">Religion</option>
<option value="112">History</option>
<option value="113">Computers & Technology</option>
<option value="114">Educational</option>
<option value="115">Cooking</option>
<option value="116">Sport</option>
<option value="132">Other</option>
</optgroup><optgroup label="Games">
<option value="85">Windows</option>
<option value="87">Linux</option>
<option value="90">Xbox</option>
<option value="91">Wii</option>
<option value="92">Handheld</option>
<option value="97">Playstation</option>
<option value="130">Other</option>
</optgroup><optgroup label="Movies">
<option value="69">3D Movies</option>
<option value="71">HD</option>
<option value="74">Screener</option>
<option value="75">UltraHD</option>
<option value="78">Dubbed Movies</option>
<option value="79">Asian/Bollywood</option>
<option value="80">Animation</option>
<option value="81">Documentary</option>
<option value="128">Other</option>
<option value="148">Blu-Ray ISO</option>
<option value="149">Cam</option>
<option value="150">DVD ISO</option>
</optgroup><optgroup label="Music">
<option value="22">MP3</option>
<option value="23">Lossless</option>
<option value="26">Radio Shows</option>
<option value="64">AAC</option>
<option value="65">Transcode</option>
<option value="66">Soundtrack</option>
<option value="67">Karaoke</option>
<option value="68">Videos/Concerts</option>
<option value="129">Other</option>
</optgroup><optgroup label="Other">
<option value="134">Subtitles</option>
<option value="136">Pictures</option>
<option value="138">Other</option>
<option value="145">Tutorials</option>
<option value="153">Wordpress</option>
<option value="154">DazPoser</option>
</optgroup><optgroup label="TV">
<option value="5">DVD ISO</option>
<option value="6">Blu-Ray ISO</option>
<option value="41">HD</option>
<option value="7">Documentary</option>
<option value="146">Sport</option>
<option value="151">Other</option>
<option value="152">Ultra HD</option>
</optgroup><optgroup label="XXX">
<option value="119">Videos</option>
<option value="155">HD</option>
<option value="121">UltraHD</option>
<option value="122">Pictures</option>
<option value="123">Magazines</option>
<option value="124">Books</option>
<option value="125">Hentai</option>
<option value="126">XXX Games</option>
*/
/* Languages:
<option value="0">--------</option>
<option value="1">English</option>
<option value="10">Bengali</option>
<option value="11">Chinese (Mandarin)</option>
<option value="12">Dutch</option>
<option value="2">French</option>
<option value="3">German</option>
<option value="13">Greek</option>
<option value="9">Hindi</option>
<option value="4">Italian</option>
<option value="5">Japanese</option>
<option value="15">Korean</option>
<option value="7">Russian</option>
<option value="6">Spanish</option>
<option value="16">Tamil</option>
<option value="17">Teleglu</option>
<option value="18">Turkish</option>
<option value="8">Unknown</option>
*/