Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update
  • Loading branch information
stevenjoezhang committed Aug 24, 2019
commit e36fe19ee7a4c2cb77cdc4459507cd974ddc46aa
2 changes: 1 addition & 1 deletion scripts/tags/caniuse.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function caniUse(args) {
return '';
}

return `<iframe data-feature="${feature}" src="https://caniuse.bitsofco.de/embed/index.html?feat=${feature}&periods=${periods}&accessible-colours=false" frameborder="0" height="400px"></iframe>`;
return `<iframe data-feature="${feature}" src="https://caniuse.bitsofco.de/embed/index.html?feat=${feature}&periods=${periods}&accessible-colours=false" frameborder="0" width="100%" height="400px"></iframe>`;
}

hexo.extend.tag.register('caniuse', caniUse, {async: true});
Expand Down
19 changes: 8 additions & 11 deletions source/js/schemes/pisces.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,14 @@ window.addEventListener('DOMContentLoaded', () => {
});
};

const resizeListener = () => {
window.matchMedia('(min-width: 992px)').addListener(event => {
if (event.matches) {
$(window).off('.affix');
$('.sidebar-inner').removeData('bs.affix');
sidebarInner.classList.remove('affix', 'affix-top', 'affix-bottom');
initAffix();
}
});
};
window.matchMedia('(min-width: 992px)').addListener(event => {
if (event.matches) {
$(window).off('.affix');
$('.sidebar-inner').removeData('bs.affix');
sidebarInner.classList.remove('affix', 'affix-top', 'affix-bottom');
initAffix();
}
});

initAffix();
resizeListener();
});
2 changes: 1 addition & 1 deletion source/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ NexT.utils = {
if ((typeof data === 'string') && (data.indexOf('ciu_embed') > -1)) {
var featureID = data.split(':')[1];
var height = data.split(':')[2];
document.querySelector(`iframe[data-feature=${featureID}]`).style.height = parseInt(height, 10) + 30 + 'px';
document.querySelector(`iframe[data-feature=${featureID}]`).style.height = parseInt(height, 10) + 'px';
}
}, false);
},
Expand Down