forked from GithubBackups/vichan
main.js: remove init style chooser
This commit is contained in:
parent
4dfbb2c65b
commit
c22c5a35de
@ -220,26 +220,6 @@ var resourceVersion = document.currentScript.getAttribute('data-resource-version
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% verbatim %}
|
{% verbatim %}
|
||||||
|
|
||||||
function initStyleChooser() {
|
|
||||||
let newElement = document.createElement('div');
|
|
||||||
newElement.className = 'styles';
|
|
||||||
|
|
||||||
for (styleName in styles) {
|
|
||||||
let style = document.createElement('a');
|
|
||||||
style.innerHTML = '[' + styleName + ']';
|
|
||||||
style.onclick = function() {
|
|
||||||
changeStyle(this.innerHTML.substring(1, this.innerHTML.length - 1), this);
|
|
||||||
};
|
|
||||||
if (styleName == selectedstyle) {
|
|
||||||
style.className = 'selected';
|
|
||||||
}
|
|
||||||
style.href = 'javascript:void(0);';
|
|
||||||
newElement.appendChild(style);
|
|
||||||
}
|
|
||||||
|
|
||||||
document.getElementsByTagName('body')[0].insertBefore(newElement, document.getElementsByTagName('body')[0].lastChild.nextSibling);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getCookie(cookie_name) {
|
function getCookie(cookie_name) {
|
||||||
let results = document.cookie.match('(^|;) ?' + cookie_name + '=([^;]*)(;|$)');
|
let results = document.cookie.match('(^|;) ?' + cookie_name + '=([^;]*)(;|$)');
|
||||||
if (results) {
|
if (results) {
|
||||||
@ -418,8 +398,6 @@ var script_settings = function(script_name) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
initStyleChooser();
|
|
||||||
|
|
||||||
{% endverbatim %}
|
{% endverbatim %}
|
||||||
{% if config.allow_delete %}
|
{% if config.allow_delete %}
|
||||||
if (document.forms.postcontrols) {
|
if (document.forms.postcontrols) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user