Skip to content

Instantly share code, notes, and snippets.

@lynettequek
Last active November 2, 2017 12:28
Show Gist options
  • Save lynettequek/aa1fc50dd2ad5a3b489178ae8ff383f8 to your computer and use it in GitHub Desktop.
Save lynettequek/aa1fc50dd2ad5a3b489178ae8ff383f8 to your computer and use it in GitHub Desktop.
xsearch-mediaplatforms
<!--MEDIA PLATFORMS-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js" type="text/javascript"></script>
<script>
function xsearch()
{
var searchterm = document.getElementById('searchbox').value;
//add search strings here in a new window.open()
//YouTube
window.open('https://www.youtube.com/results?search_query='+searchterm);
//Vimeo
window.open('https://vimeo.com/search?q='+searchterm);
//SoundCloud
window.open('https://soundcloud.com/search?q='+searchterm);
}
</script>
<center>
<input id="searchbox" style="border: 1px solid #643265;margin-top:50px;margin-right:5px;width:400px;font-size:15px;padding:10px;border-radius:8px" onkeydown="if (event.keyCode == 13) { xsearch(); return false; }" type="text" /><input id="searchbutton" style="margin-top:2px;border: 1px solid #bdb379;background-color: #fca311;margin-right:10px;padding:10px;border-radius:8px;font-size:15px" onclick="xsearch();" onkeypress="xsearch();" type="button" value="GO" />
</center>
<!--
xsearch: media platforms
(c) 2017, Lynette Quek
University of York
assisted by Stephanie Jesper
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment