2017-11-12 22:00:40 +01:00
|
|
|
// Copyright (c) 2017 kroppy. All rights reserved.
|
|
|
|
// Use of this source code is governed by a Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0) license
|
|
|
|
// that can be found at https://creativecommons.org/licenses/by-nc-nd/4.0/
|
|
|
|
|
|
|
|
// shrink or expand theme field
|
|
|
|
function RefreshFields() {
|
2018-03-13 14:39:34 +01:00
|
|
|
if (document.getElementById("theme_list").options.length == 0) {
|
|
|
|
document.getElementById("field_theme").style.height = "45px";
|
2017-11-12 22:00:40 +01:00
|
|
|
} else {
|
2018-03-13 14:39:34 +01:00
|
|
|
document.getElementById("field_theme").style.height = "";
|
2017-11-12 22:00:40 +01:00
|
|
|
}
|
|
|
|
if (browserId == "F") {
|
2018-03-13 14:39:34 +01:00
|
|
|
document.querySelectorAll("#scrollbar_size_indicator, #scrollbar_thumb, #scrollbar_thumb_hover, #scrollbar_track").forEach(function(s){
|
|
|
|
s.style.display = "none";
|
|
|
|
});
|
2017-11-12 22:00:40 +01:00
|
|
|
}
|
|
|
|
if (browserId == "V") {
|
2018-03-13 14:39:34 +01:00
|
|
|
let WebPanelUrlBox = document.getElementById("url_for_web_panel");
|
|
|
|
WebPanelUrlBox.value = (chrome.runtime.getURL("sidebar.html"));
|
|
|
|
WebPanelUrlBox.setAttribute("readonly", true);
|
2017-11-12 22:00:40 +01:00
|
|
|
} else{
|
2018-03-13 14:39:34 +01:00
|
|
|
document.getElementById("field_vivaldi").style.display = "none";
|
|
|
|
}
|
|
|
|
if (document.getElementById("show_toolbar").checked) {
|
|
|
|
document.querySelectorAll("#options_available_buttons, #sample_toolbar_block, #options_reset_toolbar_button").forEach(function(s){
|
|
|
|
s.style.display = "";
|
|
|
|
});
|
|
|
|
document.getElementById("field_show_toolbar").style.height = "";
|
|
|
|
} else{
|
|
|
|
document.querySelectorAll("#options_available_buttons, #sample_toolbar_block, #options_reset_toolbar_button").forEach(function(s){
|
|
|
|
s.style.display = "none";
|
|
|
|
});
|
|
|
|
document.getElementById("field_show_toolbar").style.height = "6";
|
2017-11-12 22:00:40 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function RefreshGUI() {
|
2018-03-13 14:39:34 +01:00
|
|
|
let button_filter_type = document.getElementById("button_filter_type");
|
|
|
|
if (button_filter_type != null) {
|
|
|
|
button_filter_type.classList.add("url");
|
|
|
|
button_filter_type.classList.remove("title");
|
|
|
|
}
|
|
|
|
if (document.querySelector(".on") != null) {
|
|
|
|
document.getElementById("toolbar").style.height = "53px";
|
2017-11-12 22:00:40 +01:00
|
|
|
} else {
|
2018-03-13 14:39:34 +01:00
|
|
|
document.getElementById("toolbar").style.height = "26px";
|
2017-11-12 22:00:40 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|