show reply box on ukko page
This commit is contained in:
parent
fb2b80335e
commit
3283e53c5c
@ -354,7 +354,7 @@ function inject_hover_for_element(elem) {
|
||||
function init(prefix) {
|
||||
// inject posthover ...
|
||||
inject_hover_for_element(document);
|
||||
if ( /\.html$/.test(document.location.pathname) ) {
|
||||
if ( /\.html$/.test(document.location.pathname) && ( ! /ukko/.test(document.location.pathname)) ) {
|
||||
// board / thread page
|
||||
console.log("not loading reply widget");
|
||||
} else {
|
||||
|
@ -689,7 +689,7 @@ parent.appendChild(wrapper);parent.backlink=false;},function(msg){var wrapper=do
|
||||
parent.backlink=true;}};parent.backlink=true;}
|
||||
function inject_hover_for_element(elem){var elems=elem.getElementsByClassName("backlink");var ls=[];var l=elems.length;for(var idx=0;idx<l;idx++){var e=elems[idx];ls.push(e);}
|
||||
for(var elem in ls){inject_hover(prefix,ls[elem]);}}
|
||||
function init(prefix){inject_hover_for_element(document);if(/\.html$/.test(document.location.pathname)){console.log("not loading reply widget");}else{var rpl=getReplyTo();rpl.setPrefix(prefix);rpl.setBoard("overchan.random");rpl.update();rpl.updateCaptcha();var e=rpl.elem;var mouseDownX,mouseDownY;var $dragging=null;$(rpl.elem).on("mousemove",function(ev){if($dragging){var x=ev.pageX-$(this).width()/2,y=ev.pageY-$(this).height()/2;$dragging.offset({top:y,left:x});}});$(rpl.elem).on("mousedown",e,function(ev){$dragging=$(rpl.elem);});$(rpl.elem).on("mouseup",function(e){$dragging=null;});e=document.getElementById("postform_submit");var postit=function(){var f=document.querySelector("form");var r=getReplyTo();r.showMessage("posting... ");r.post(function(j){if(j.error){r.showError(j.error);}else{r.showMessage("posted :^)");r.updateCaptcha();r.clear();}},function(err){r.showError(err);r.clearSolution();});}
|
||||
function init(prefix){inject_hover_for_element(document);if(/\.html$/.test(document.location.pathname)&&(!/ukko/.test(document.location.pathname))){console.log("not loading reply widget");}else{var rpl=getReplyTo();rpl.setPrefix(prefix);rpl.setBoard("overchan.random");rpl.update();rpl.updateCaptcha();var e=rpl.elem;var mouseDownX,mouseDownY;var $dragging=null;$(rpl.elem).on("mousemove",function(ev){if($dragging){var x=ev.pageX-$(this).width()/2,y=ev.pageY-$(this).height()/2;$dragging.offset({top:y,left:x});}});$(rpl.elem).on("mousedown",e,function(ev){$dragging=$(rpl.elem);});$(rpl.elem).on("mouseup",function(e){$dragging=null;});e=document.getElementById("postform_submit");var postit=function(){var f=document.querySelector("form");var r=getReplyTo();r.showMessage("posting... ");r.post(function(j){if(j.error){r.showError(j.error);}else{r.showMessage("posted :^)");r.updateCaptcha();r.clear();}},function(err){r.showError(err);r.clearSolution();});}
|
||||
var f=document.querySelector("form");f.onsubmit=function(){postit();return false;}}}
|
||||
/* local file: ./contrib/js/theme.js */
|
||||
function enable_theme(prefix,name){if(prefix&&name){var theme=document.getElementById("current_theme");if(theme){theme.href=prefix+"static/"+name+".css";var st=get_storage();st.nntpchan_prefix=prefix;st.nntpchan_theme=name;}}}
|
||||
|
Reference in New Issue
Block a user