made inline expanding of images optional
This commit is contained in:
parent
235163883d
commit
11409bb9d7
@ -249,6 +249,9 @@
|
|||||||
$config['show_ratio'] = false;
|
$config['show_ratio'] = false;
|
||||||
// Display the file's original filename
|
// Display the file's original filename
|
||||||
$config['show_filename']= true;
|
$config['show_filename']= true;
|
||||||
|
// Inline expanding of images with Javascript
|
||||||
|
$config['inline_expanding'] = true;
|
||||||
|
|
||||||
|
|
||||||
// Directory where temporary files will be created. Not really used much yet except for some experimental stuff.
|
// Directory where temporary files will be created. Not really used much yet except for some experimental stuff.
|
||||||
$config['tmp'] = '/tmp';
|
$config['tmp'] = '/tmp';
|
||||||
|
58
main.js
58
main.js
@ -58,8 +58,8 @@ function citeReply(id) {
|
|||||||
|
|
||||||
var selectedstyle = 'Yotsuba B';
|
var selectedstyle = 'Yotsuba B';
|
||||||
var styles = [
|
var styles = [
|
||||||
['Yotsuba B', '/Tinyboard/default.css'],
|
['Yotsuba B', '/Tinyboard/stylesheets/default.css'],
|
||||||
['Yotsuba', '/Tinyboard/yotsuba.css']
|
['Yotsuba', '/Tinyboard/stylesheets/yotsuba.css']
|
||||||
];
|
];
|
||||||
var saved = {};
|
var saved = {};
|
||||||
|
|
||||||
@ -113,31 +113,7 @@ function rememberStuff() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function init()
|
function init_expanding() {
|
||||||
{
|
|
||||||
newElement = document.createElement('div');
|
|
||||||
newElement.className = 'styles';
|
|
||||||
|
|
||||||
for(x=0;x<styles.length;x++) {
|
|
||||||
style = document.createElement('a');
|
|
||||||
style.innerHTML = '[' + styles[x][0] + ']';
|
|
||||||
style.href = 'javascript:changeStyle(' + x + ');';
|
|
||||||
if(selectedstyle == styles[x][0])
|
|
||||||
style.className = 'selected';
|
|
||||||
newElement.appendChild(style);
|
|
||||||
}
|
|
||||||
|
|
||||||
document.getElementsByTagName('body')[0].insertBefore(newElement, document.getElementsByTagName('body')[0].lastChild)
|
|
||||||
|
|
||||||
if(document.forms.postcontrols) {
|
|
||||||
document.forms.postcontrols.password.value = localStorage.password;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (window.location.hash.indexOf('q') == 1)
|
|
||||||
citeReply(window.location.hash.substring(2));
|
|
||||||
else if (window.location.hash.substring(1))
|
|
||||||
highlightReply(window.location.hash.substring(1));
|
|
||||||
|
|
||||||
link = document.getElementsByTagName('a');
|
link = document.getElementsByTagName('a');
|
||||||
for ( i in link ) {
|
for ( i in link ) {
|
||||||
if(typeof link[i] == "object" && link[i].childNodes[0].src) {
|
if(typeof link[i] == "object" && link[i].childNodes[0].src) {
|
||||||
@ -169,6 +145,34 @@ function init()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function init()
|
||||||
|
{
|
||||||
|
newElement = document.createElement('div');
|
||||||
|
newElement.className = 'styles';
|
||||||
|
|
||||||
|
for(x=0;x<styles.length;x++) {
|
||||||
|
style = document.createElement('a');
|
||||||
|
style.innerHTML = '[' + styles[x][0] + ']';
|
||||||
|
style.href = 'javascript:changeStyle(' + x + ');';
|
||||||
|
if(selectedstyle == styles[x][0])
|
||||||
|
style.className = 'selected';
|
||||||
|
newElement.appendChild(style);
|
||||||
|
}
|
||||||
|
|
||||||
|
document.getElementsByTagName('body')[0].insertBefore(newElement, document.getElementsByTagName('body')[0].lastChild)
|
||||||
|
|
||||||
|
if(document.forms.postcontrols) {
|
||||||
|
document.forms.postcontrols.password.value = localStorage.password;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (window.location.hash.indexOf('q') == 1)
|
||||||
|
citeReply(window.location.hash.substring(2));
|
||||||
|
else if (window.location.hash.substring(1))
|
||||||
|
highlightReply(window.location.hash.substring(1));
|
||||||
|
|
||||||
|
init_expanding();
|
||||||
|
}
|
||||||
|
|
||||||
var RecaptchaOptions = {
|
var RecaptchaOptions = {
|
||||||
theme : 'clean'
|
theme : 'clean'
|
||||||
};
|
};
|
||||||
|
@ -113,31 +113,7 @@ function rememberStuff() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function init()
|
function init_expanding() {
|
||||||
{
|
|
||||||
newElement = document.createElement('div');
|
|
||||||
newElement.className = 'styles';
|
|
||||||
|
|
||||||
for(x=0;x<styles.length;x++) {
|
|
||||||
style = document.createElement('a');
|
|
||||||
style.innerHTML = '[' + styles[x][0] + ']';
|
|
||||||
style.href = 'javascript:changeStyle(' + x + ');';
|
|
||||||
if(selectedstyle == styles[x][0])
|
|
||||||
style.className = 'selected';
|
|
||||||
newElement.appendChild(style);
|
|
||||||
}
|
|
||||||
|
|
||||||
document.getElementsByTagName('body')[0].insertBefore(newElement, document.getElementsByTagName('body')[0].lastChild)
|
|
||||||
|
|
||||||
if(document.forms.postcontrols) {
|
|
||||||
document.forms.postcontrols.password.value = localStorage.password;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (window.location.hash.indexOf('q') == 1)
|
|
||||||
citeReply(window.location.hash.substring(2));
|
|
||||||
else if (window.location.hash.substring(1))
|
|
||||||
highlightReply(window.location.hash.substring(1));
|
|
||||||
|
|
||||||
link = document.getElementsByTagName('a');
|
link = document.getElementsByTagName('a');
|
||||||
for ( i in link ) {
|
for ( i in link ) {
|
||||||
if(typeof link[i] == "object" && link[i].childNodes[0].src) {
|
if(typeof link[i] == "object" && link[i].childNodes[0].src) {
|
||||||
@ -169,6 +145,34 @@ function init()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function init()
|
||||||
|
{
|
||||||
|
newElement = document.createElement('div');
|
||||||
|
newElement.className = 'styles';
|
||||||
|
|
||||||
|
for(x=0;x<styles.length;x++) {
|
||||||
|
style = document.createElement('a');
|
||||||
|
style.innerHTML = '[' + styles[x][0] + ']';
|
||||||
|
style.href = 'javascript:changeStyle(' + x + ');';
|
||||||
|
if(selectedstyle == styles[x][0])
|
||||||
|
style.className = 'selected';
|
||||||
|
newElement.appendChild(style);
|
||||||
|
}
|
||||||
|
|
||||||
|
document.getElementsByTagName('body')[0].insertBefore(newElement, document.getElementsByTagName('body')[0].lastChild)
|
||||||
|
|
||||||
|
if(document.forms.postcontrols) {
|
||||||
|
document.forms.postcontrols.password.value = localStorage.password;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (window.location.hash.indexOf('q') == 1)
|
||||||
|
citeReply(window.location.hash.substring(2));
|
||||||
|
else if (window.location.hash.substring(1))
|
||||||
|
highlightReply(window.location.hash.substring(1));
|
||||||
|
|
||||||
|
{config[inline_expanding]?init_expanding();}
|
||||||
|
}
|
||||||
|
|
||||||
var RecaptchaOptions = {
|
var RecaptchaOptions = {
|
||||||
theme : 'clean'
|
theme : 'clean'
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user