-
Notifications
You must be signed in to change notification settings - Fork 458
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from pearlwang1106/master
畅言组件目录调整
- Loading branch information
Showing
4 changed files
with
52 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,10 +41,6 @@ mip-ad 用来支持站长添加网页内自定义广告,主要包括连接、 | |
</mip-ad> | ||
``` | ||
|
||
|
||
|
||
|
||
|
||
## 支持广告 | ||
|
||
- [通用广告](mip-ad-comm.md) | ||
|
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<style mip-custom> | ||
body { | ||
padding: 0 22px; | ||
background-color: #fff; | ||
} | ||
h3 { | ||
padding: 0; | ||
} | ||
p { | ||
text-align: left; | ||
line-height: 26px; | ||
} | ||
mip-img { | ||
margin: 10px auto; | ||
} | ||
</style |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* 畅言插件 | ||
* @author smileU | ||
* @version 1.0.0 | ||
*/ | ||
define(function(require) { | ||
var $ = require('zepto'); | ||
|
||
var customElement = require('customElement').create(); | ||
|
||
customElement.prototype.createdCallback = function () { | ||
|
||
var _element = this.element; | ||
|
||
var appid = _element.getAttribute('appid'), | ||
conf = _element.getAttribute("conf"); | ||
|
||
var $_element = $(_element); | ||
var html = [ | ||
'<script type="text/javascript">', | ||
'var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "//changyan.sohu.com/upload/changyan.js?appid=' + appid + '&conf=' + conf + '";var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })();', | ||
'</script>' | ||
]; | ||
|
||
$_element.append(html.join('')); | ||
} | ||
|
||
return customElement; | ||
|
||
}); |
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