Skip to content

Commit

Permalink
fix(background): set bing background before lazyload initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
koyabr committed Jun 15, 2017
1 parent 63548f7 commit 5c4d700
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions layout/_partial/import_js.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@
<% if (page.mathjax) { %>
<%- partial('_widget/mathjax') %>
<% } %>

<!-- Bing Background -->
<% if(theme.background.bing.enable) { %>
<script type="text/ls-javascript" id="Bing-Background-script">
queue.offer(function(){
$('body').attr('data-original', 'https://api.i-meto.com/bing?<%= theme.background.bing.parameter %>');
});
</script>
<% } %>

<script type="text/ls-javascript" id="lazy-load">
// Offer LazyLoad
queue.offer(function(){
Expand All @@ -86,15 +96,6 @@
});
</script>

<!-- Bing Background -->
<% if(theme.background.bing.enable) { %>
<script type="text/ls-javascript" id="Bing-Background-script">
queue.offer(function(){
$('body').attr('data-original', 'https://api.i-meto.com/bing?<%= theme.background.bing.parameter %>');
});
</script>
<% } %>

<script>
(function(){
var scriptList = document.querySelectorAll('script[type="text/ls-javascript"]')
Expand Down

0 comments on commit 5c4d700

Please sign in to comment.