Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ...
- <content select=".disqus1"></content>
- </template>
- <script>
- Polymer({
- is: 'my-testView1',
- ready: function ()
- {
- var disqus_config = function () {
- this.page.url = 'https://www.example.com/testView1';
- this.page.identifier = '/testView1';
- this.page.disqus_shortname = "myChannelID";
- };
- (function() {
- var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
- dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
- (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
- })();
- }
- });
- </script>
- ...
- <content select=".disqus2"></content>
- </template>
- <script>
- Polymer({
- is: 'my-testView2',
- ready: function ()
- {
- var reset = function (newIdentifier, newUrl) {
- DISQUS.reset({
- reload: true,
- config: function () {
- this.page.identifier = 'https://www.example.com/testView2';
- this.page.url = '/testView2';
- }
- });
- };
- (function() {
- var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
- dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
- (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
- })();
- }
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement