feat(plugin): add codesponsor plugin

This commit is contained in:
qingwei.li 2017-09-20 08:57:19 +08:00
commit 46ac4c3fd2
5 changed files with 97 additions and 3 deletions

View file

@ -81,3 +81,8 @@ export function off (el, type, handler) {
export function toggleClass (el, type, val) {
el && el.classList[val ? type : 'toggle'](val || type)
}
export function style (content) {
appendTo(head, create('style', content))
}