Skip to content
Permalink
Browse files

Tiny JS fix for webkit browsers

  • Loading branch information...
marlencrabapple committed Sep 20, 2014
1 parent b104589 commit 40149edc3f1a7cb9a9f501311b4fe703df415301
Showing with 15 additions and 10 deletions.
  1. +10 −8 kareha.js
  2. +5 −2 mode_message/templates.pl
@@ -110,18 +110,20 @@ function is_ie()
return(document.all&&!document.opera);
}

function get_markup() {
return get_cookie('markup') || default_markup;
}

function set_new_inputs(id) {
var el = document.getElementById(id);

function set_new_inputs(id)
{
var el=document.getElementById(id);
if(!el || !el.link) return;

if(!el||!el.link) return;
if(!el.field_a.value) el.field_a.value = get_cookie("name");
if(!el.field_b.value) el.field_b.value = get_cookie("link");
if(!el.password.value) el.password.value = get_password("password");
if(el.markup && !el.comment.value) el.markup.value = get_markup();

if(!el.field_a.value) el.field_a.value=get_cookie("name");
if(!el.field_b.value) el.field_b.value=get_cookie("link");
if(!el.password.value) el.password.value=get_password("password");
if(el.markup&&!el.comment.value) el.markup.value=get_cookie("markup");
select_markup(el.markup);
}

@@ -116,7 +116,7 @@
<link rel="alternate" title="RSS feed" href="<var expand_filename(RSS_FILE)>" type="application/rss+xml" />
</if>
<link rel="stylesheet" type="text/css" href="<var expand_filename(GLOBAL_STYLE)>" />
<link rel="stylesheet" type="text/css" href="<var expand_filename(CSS_DIR . GLOBAL_STYLE)>" />
<loop $stylesheets>
<if $filename ne 'message'>
@@ -130,6 +130,7 @@
var markup_descriptions={
<loop $markup_formats><var $id>:<var js_string(S_DESCRIBE_FORMATS-\>{$id})>,</loop>dummy:''
};
var default_markup="<const DEFAULT_MARKUP>";
</script>
<script type="text/javascript" src="<var expand_filename(JS_FILE)>"></script>
<script type="text/javascript">require_script_version("3.a");</script>
@@ -143,7 +144,9 @@
</body></html>
};


use constant INSTALL_TEMPLATE => compile_template(GLOBAL_HEAD_INCLUDE . q{
Just a test.
} . GLOBAL_FOOT_INCLUDE);

use constant POSTING_FORM_TEMPLATE => compile_template(q{
<if !$thread><tr>

0 comments on commit 40149ed

Please sign in to comment.
You can’t perform that action at this time.