mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 00:07:57 -05:00
Add hook for finalizing js_preload.
Useful if things generated in multiple places need to be coalesced into a single preload URL.
This commit is contained in:
@@ -170,6 +170,8 @@ class JSPreload(js.DataSource):
|
||||
self.data[url] = data
|
||||
|
||||
def use(self):
|
||||
hooks.get_hook("js_preload.use").call(js_preload=self)
|
||||
|
||||
if self.data:
|
||||
return js.DataSource.use(self)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user