Add return to all onclicks, and ; to other javascript hooks.

This commit is contained in:
voussoir 2020-09-04 10:37:49 -07:00
parent afcea49135
commit 4af4985ac5
2 changed files with 13 additions and 13 deletions

View file

@ -167,8 +167,8 @@ https://stackoverflow.com/a/35153397
<div class="tab" data-tab-title="Videos"> <div class="tab" data-tab-title="Videos">
{% if channel is not none %} {% if channel is not none %}
<div><button class="refresh_button button_with_spinner" onclick="refresh_channel_form(false)">Refresh new videos</button></div> <div><button class="refresh_button button_with_spinner" onclick="return return refresh_channel_form(false);">Refresh new videos</button></div>
<div><button class="refresh_button button_with_spinner" onclick="refresh_channel_form(true)">Refresh everything</button></div> <div><button class="refresh_button button_with_spinner" onclick="return return refresh_channel_form(true);">Refresh everything</button></div>
<p><!-- spacer --></p> <p><!-- spacer --></p>
{% endif %} {% endif %}
@ -207,7 +207,7 @@ https://stackoverflow.com/a/35153397
{% for video in videos %} {% for video in videos %}
<div id="video_card_{{video.id}}" <div id="video_card_{{video.id}}"
data-ytid="{{video.id}}" data-ytid="{{video.id}}"
onclick="onclick_select(event)" onclick="return onclick_select(event);"
class="video_card video_card_{{video.download}}" class="video_card video_card_{{video.download}}"
> >
<img class="video_thumbnail" loading="lazy" src="http://i3.ytimg.com/vi/{{video.id}}/default.jpg" height="100px"> <img class="video_thumbnail" loading="lazy" src="http://i3.ytimg.com/vi/{{video.id}}/default.jpg" height="100px">
@ -227,7 +227,7 @@ https://stackoverflow.com/a/35153397
{% else %} {% else %}
class="video_action_pending" class="video_action_pending"
{% endif %} {% endif %}
onclick="action_button_passthrough(event, api.videos.mark_state, 'pending')" onclick="return action_button_passthrough(event, api.videos.mark_state, 'pending');"
>Revert to Pending</button> >Revert to Pending</button>
<button <button
@ -236,7 +236,7 @@ https://stackoverflow.com/a/35153397
{% else %} {% else %}
class="video_action_download hidden" class="video_action_download hidden"
{% endif %} {% endif %}
onclick="action_button_passthrough(event, api.videos.start_download)" onclick="return action_button_passthrough(event, api.videos.start_download);"
>Download</button> >Download</button>
<button <button
@ -245,12 +245,12 @@ https://stackoverflow.com/a/35153397
{% else %} {% else %}
class="video_action_ignore hidden" class="video_action_ignore hidden"
{% endif %} {% endif %}
onclick="action_button_passthrough(event, api.videos.mark_state, 'ignored')" onclick="return action_button_passthrough(event, api.videos.mark_state, 'ignored');"
>Ignore</button> >Ignore</button>
</div> </div>
<div class="embed_toolbox"> <div class="embed_toolbox">
<button class="show_embed_button" onclick="toggle_embed_video('{{video.id}}');">Embed</button> <button class="show_embed_button" onclick="return toggle_embed_video('{{video.id}}');">Embed</button>
<button class="hide_embed_button hidden" onclick="toggle_embed_video('{{video.id}}');">Unembed</button> <button class="hide_embed_button hidden" onclick="return toggle_embed_video('{{video.id}}');">Unembed</button>
</div> </div>
</div> </div>
{% endfor %} {% endfor %}
@ -261,7 +261,7 @@ https://stackoverflow.com/a/35153397
<div class="tab" data-tab-title="Settings"> <div class="tab" data-tab-title="Settings">
<div> <div>
New videos are: New videos are:
<select onchange="set_automark_hook(event)"> <select onchange="set_automark_hook(event);">
<option value="pending" {{"selected" if channel.automark == "pending" else ""}} >pending</option> <option value="pending" {{"selected" if channel.automark == "pending" else ""}} >pending</option>
<option value="downloaded" {{"selected" if channel.automark == "downloaded" else ""}} >downloaded</option> <option value="downloaded" {{"selected" if channel.automark == "downloaded" else ""}} >downloaded</option>
<option value="ignored" {{"selected" if channel.automark == "ignored" else ""}} >ignored</option> <option value="ignored" {{"selected" if channel.automark == "ignored" else ""}} >ignored</option>
@ -273,7 +273,7 @@ https://stackoverflow.com/a/35153397
<button class="red_button button_with_confirm" <button class="red_button button_with_confirm"
data-prompt="Delete channel and all videos?" data-prompt="Delete channel and all videos?"
data-onclick="delete_channel_form();" data-onclick="return delete_channel_form();"
>Delete Channel</button> >Delete Channel</button>
</div> <!-- tab-settings --> </div> <!-- tab-settings -->
{% endif %} {% endif %}

View file

@ -44,11 +44,11 @@
<body> <body>
{{header.make_header()}} {{header.make_header()}}
<div id="content_body"> <div id="content_body">
<div><button class="refresh_button button_with_spinner" onclick="refresh_all_channels_form(false)">Refresh new videos</button></div> <div><button class="refresh_button button_with_spinner" onclick="return refresh_all_channels_form(false);">Refresh new videos</button></div>
<div><button class="refresh_button button_with_spinner" onclick="refresh_all_channels_form(true)">Refresh everything</button></div> <div><button class="refresh_button button_with_spinner" onclick="return refresh_all_channels_form(true);">Refresh everything</button></div>
<div> <div>
<input type="text" id="new_channel_textbox" placeholder="Channel id"> <input type="text" id="new_channel_textbox" placeholder="Channel id">
<button id="new_channel_button" class="button_with_spinner" onclick="add_channel_form()">Add new channel</button> <button id="new_channel_button" class="button_with_spinner" onclick="return add_channel_form();">Add new channel</button>
</div> </div>
<div id="channels"> <div id="channels">