Last active
April 5, 2018 17:34
-
-
Save agate/060de11b47b965c9d342fe4fb8bdaa34 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<style> | |
html, body { | |
height: 100% | |
} | |
body { | |
margin: 0; | |
padding: 0; | |
width: 100%; | |
display: flex; | |
} | |
#youdao-dict { | |
flex: 1; | |
flex-direction: column; | |
width: 840px; | |
max-width: 840px; | |
margin-left: -100px; | |
margin-top: -240px; | |
} | |
</style> | |
</head> | |
<body> | |
<iframe id="youdao-dict" frameborder="0"> | |
</iframe> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
<script> | |
$(function () { | |
var $content = $('#youdao-dict'); | |
var parameters = location.href.slice(location.href.indexOf('?') + 1); | |
$content.attr('src', '//dict.youdao.com/search?' + parameters); | |
}) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment