mirror of
https://github.com/tcsenpai/Zundler.git
synced 2025-06-10 05:17:12 +00:00
Don't bundle pre-load links, has no effect
This commit is contained in:
parent
d698771b7a
commit
9d133292a3
@ -129,14 +129,6 @@ def embed_html_resources(html, base_dir, js):
|
|||||||
import bs4
|
import bs4
|
||||||
soup = bs4.BeautifulSoup(html, 'lxml')
|
soup = bs4.BeautifulSoup(html, 'lxml')
|
||||||
|
|
||||||
for link in soup.select('head > link[rel="preload"][as="font"]'):
|
|
||||||
# Get filename relative to resource
|
|
||||||
filename = os.path.join(
|
|
||||||
base_dir,
|
|
||||||
link['href'], # TODO convert from POSIX
|
|
||||||
)
|
|
||||||
link['href'] = to_data_uri(filename, mime_type=link['type'])
|
|
||||||
|
|
||||||
script = soup.new_tag("script")
|
script = soup.new_tag("script")
|
||||||
script.string = js
|
script.string = js
|
||||||
soup.find('body').append(script)
|
soup.find('body').append(script)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user