-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace all instances of window.onload with addEventListener (#1185)
* Add event listener for window loading * reformat * reformat * new line at end * remove semi colons * replace all instances of window.load with addEventListener * add new endline * remove extra spacecs
- Loading branch information
1 parent
3afe20e
commit 39a09d2
Showing
5 changed files
with
18 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
{{ $baseUrl := .Get "baseUrl" }} | ||
<div id="{{ .Get "id" }}" class="image-gallery" data-nanogallery2='{ "itemsBaseURL": "{{ partial "resource_url.html" (dict "context" .Page "url" $baseUrl) }}" }'> | ||
{{ .Inner }} | ||
{{ .Inner }} | ||
</div> | ||
|
||
<script> | ||
window.onload = function() { | ||
if (window.initNanogallery2) | ||
window.initNanogallery2() | ||
window.addEventListener('load', function() { | ||
if (window.initNanogallery2) { | ||
window.initNanogallery2() | ||
} | ||
}) | ||
</script> |
This file contains 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