// ==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
// @downloadURL 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(" <= Choose before editing the description ");
}
$("[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: