-
Notifications
You must be signed in to change notification settings - Fork 5
/
parameterparsers.txt
39 lines (36 loc) · 1.22 KB
/
parameterparsers.txt
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
readmanga + adultmanga
function asd() {
var str = "";
var params = $(".cTable .js-link");
var pattern = "this, '(.*)'";
for (var i = 0; i < params.length; i++) {
var param = params[i];
var name = param.title;
name = name.charAt(0).toUpperCase() + name.substring(1, name.length);
var onclick = param.onclick.toString();
var v = onclick.match(pattern)[1];
str += 'categories.add(new BasicFilters.RABaseTriState("' + name + '", "' + v + '"));\n'
}
console.log(str);
}
genres
var a = ($($(".rightBlock h5")[6]).parent()).find("a")
var str = "";
a.each(function(p, el) {
var name = $(el).text();
name = name.charAt(0).toUpperCase() + name.substring(1, name.length);
str += 'genres.add(new AdultGenre("' + name + '", "' + $(el).attr('href') + '"));' + '\n';
});
console.log(str);
mangareader
function asd() {
var str = "";
var params = $(".genre");
for (var i = 0; i < params.length; i++) {
var param = $(params[i]);
var name = param.text();
name = name.charAt(0).toUpperCase() + name.substring(1, name.length);
str += 'genres.add(new BasicFilters.MangaReaderTriState("' + name + '"));\n'
}
console.log(str);
}