1234567891011121314151617181920212223242526272829303132 |
- {% extends "base.html.tera" %}
- {% block content %}
- <div class="container">
- <p><!--Nothing to see here --></p>
- <button onclick="get_vid(1)"> Gachi </button>
- <button onclick="get_vid(2)"> Anime </button>
- <button onclick="get_vid(3)"> Drum & Bass </button>
- </div>
- <script lang='js'>
- function get_vid(type_id) {
- axios({
- method:'get',
- url: `/shitpost/${type_id}`
- })
- .then((response) => {
- // handle success
- window.open(response.data.url, "_blank").focus();
- })
- .catch((error) => {
- // handle error
- console.log(error);
- })
- }
- </script>
- {% endblock content %}
|