Untitled diff

बनाया गया Diff कभी समाप्त नहीं होता
297 हटाए गए
700 लाइनें
319 जोड़े गए
741 लाइनें
// ==UserScript==
// ==UserScript==
// @name EH Gallery Quick Favourite
// @name EH Gallery Quick Favourite
// @author FabulousCupcake
// @author FabulousCupcake
// @namespace http://fabulous.cupcake.jp.net/
// @namespace http://fabulous.cupcake.jp.net/
// @version v2.1.0
// @version v2.2.0
// @description Upgrades the gallery favourite button to allow quick favouriting of a gallery.
// @description Upgrades the gallery favourite button to allow quick favouriting of a gallery.
// @include /^https?://(ex|(?:g\.)?e-)hentai\.org/g/\d+?/\w{10}/?/
// @include /^https?://(ex|(?:g\.)?e-)hentai\.org/g/\d+?/\w{10}/?/
// @include /^https?://(ex|(?:g\.)?e-)hentai\.org\/gallerypopups\.php\?.+&act=addfav/
// @include /^https?://(ex|(?:g\.)?e-)hentai\.org\/gallerypopups\.php\?.+&act=addfav/
// @grant none
// @grant none
// ==/UserScript==
// ==/UserScript==


/* ====================================== *\
/* ====================================== *\
Hotkey Map
Hotkey Map
----
----
Shift+F : Initiate Favouriting Mode
Shift+F : Initiate Favouriting Mode
[0-9] : Favourite 0-9
[0-9] : Favourite 0-9
- : Remove Favourite
- : Remove Favourite
----
----
Pressing any other key during act-
Pressing any other key during act-
ive favouriting mode will exit the
ive favouriting mode will exit the
active favving mode.
active favving mode.
\* ====================================== */
\* ====================================== */




// Config
// Config
const config = {
const config = {
'debug': false,
"debug": false,
'timeout': 5000, // XHR Timelimit in milliseconds
"editor_size": 60, // Width of the favnotes input element in not-px unit
'editor_size': 60, // Width of the favnotes input element in not-px unit
"hotkeys": true, // Enable hotkeys
'hotkeys': true, // Enable hotkeys
"cheatsheet": true // Show cheatsheet after pressing Shift+F?
'cheatsheet': true // Show cheatsheet after pressing Shift+F?
};
};


// Colors
// Colors
var geh = {
var geh = {
'border' : '#5C0D12',
"border" : "#5C0D12",
'bg' : '#E3E0D1',
"bg" : "#E3E0D1",
'bg_light' : '#F8F6EE',
"bg_light" : "#F8F6EE",
};
};
var exh = {
var exh = {
'border' : '#000000',
"border" : "#000000",
'bg' : '#4F535B',
"bg" : "#4F535B",
'bg_light' : '#5F636B',
"bg_light" : "#5F636B",
};
};
var color;
var color;
var hotkeyInit = false;
var hotkeyInit = false;


// Are we on fjords?
// Are we on fjords?
color = (location.host.substr(0,2) == "ex" ) ?
color = (location.host.substr(0,2) == "ex" ) ?
color = exh :
color = exh :
color = geh;
color = geh;


// Stylesheet
// Stylesheet
var stylesheet =`
var stylesheet =`
#gdf {
#gdf {
margin: 6px 0 !important;
margin: 6px 0 !important;
padding: 10px 5px !important;
padding: 10px 5px !important;
width: 160px !important;
width: 160px !important;
height: 18px;
height: 18px;
position: relative;
position: relative;
border: 1px dashed ${color.border};
border: 1px dashed ${color.border};
left: -2px !important;
left: -2px !important;
}
}


#gdf > div:nth-child(1),
#gdf > div:nth-child(1),
#gdf > div:nth-child(2),
#gdf > div:nth-child(2),
#gdf > div:nth-child(3) {
#gdf > div:nth-child(3) {
display: inline !important;
display: inline !important;
float: none !important;
float: none !important;
}
}


#gdf > div:nth-child(2) > a {
#gdf > div:nth-child(2) > a {
position: relative;
position: relative;
top: -1px;
top: -1px;
line-height: 21px;
line-height: 21px;
}
}


#gdf > #fav {
#gdf > #fav {
padding-left: 5px;
padding-left: 5px;
}
}


#gdf > #fav > * {
#gdf > #fav > * {
float: none !important;
float: none !important;
display: inline-block !important;
display: inline-block !important;
margin: 0 !important;
margin: 0 !important;
position: relative;
position: relative;
top: 2px;
top: 2px;
}
}


#gdf div.i {
#gdf div.i {
display: inline-block;
display: inline-block;
margin: 0 !important;
margin: 0 !important;
}
}


#gdf a:hover {
#gdf a:hover {
color: inherit !important;
color: inherit !important;
}
}


.qf-top, .qf-bot {
.qf-top, .qf-bot {
background: ${color.bg_light} !important;
background: ${color.bg_light} !important;
width: inherit;
width: inherit;
padding: 0 5px;
padding: 0 5px;
position: absolute;
position: absolute;
left: -1px;
left: -1px;
visibility: hidden;
visibility: hidden;
border: 1px solid ${color.border};
border: 1px solid ${color.border};
}
}