Make CSS and JS path relative

This commit is contained in:
Kirill Kovalenko
2016-03-18 20:27:10 +01:00
parent 18531979e8
commit cee442b16b
2 changed files with 13 additions and 13 deletions

View File

@@ -13,7 +13,7 @@ f.close()
# Script tags
scriptsFinder = re.compile("""<script src="/(.*)"></script>""")
scriptsFinder = re.compile("""<script src="(.*)"></script>""")
scripts = scriptsFinder.findall(page)
for script in scripts:
@@ -21,13 +21,13 @@ for script in scripts:
s = open(filename)
scriptContent = "<script>%s</script>" % s.read()
s.close()
scriptTag = """<script src="/%s"></script>""" % script
scriptTag = """<script src="%s"></script>""" % script
page = page.replace(scriptTag, scriptContent)
# Style tags
stylesFinder = re.compile("""<link rel="stylesheet" href="/(.*)">""")
stylesFinder = re.compile("""<link rel="stylesheet" href="(.*)">""")
styles = stylesFinder.findall(page)
for style in styles:
@@ -35,7 +35,7 @@ for style in styles:
s = open(filename)
styleContent = "<style>%s</style>" % s.read()
s.close()
styleTag = """<link rel="stylesheet" href="/%s">""" % style
styleTag = """<link rel="stylesheet" href="%s">""" % style
page = page.replace(styleTag, styleContent)

View File

@@ -3,7 +3,7 @@
<head lang="en">
<meta charset="utf-8" />
<title>BIP39 - Mnemonic Code</title>
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<meta content="Mnemonic code for generating deterministic keys" name="description"/>
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<meta content="bitcoin mnemonic converter" name="description" />
@@ -385,13 +385,13 @@
<td class="privkey"><span></span></td>
</tr>
</script>
<script src="/js/jquery.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/bitcoinjs-1-5-7.js"></script>
<script src="/js/bitcoinjs-extensions.js"></script>
<script src="/js/sjcl-bip39.js"></script>
<script src="/js/wordlist_english.js"></script>
<script src="/js/jsbip39.js"></script>
<script src="/js/index.js"></script>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/bitcoinjs-1-5-7.js"></script>
<script src="js/bitcoinjs-extensions.js"></script>
<script src="js/sjcl-bip39.js"></script>
<script src="js/wordlist_english.js"></script>
<script src="js/jsbip39.js"></script>
<script src="js/index.js"></script>
</body>
</html>