Created
June 9, 2015 09:03
-
-
Save adamsilver/3be77a93358d79231843 to your computer and use it in GitHub Desktop.
anon.js inside ily
This file contains hidden or 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
'use strict'; | |
var Delegate = require('dom-delegate'); | |
function getNotificationHtml(message) { | |
return message; | |
} | |
module.exports = { | |
init: function () { | |
return; | |
var delegate = new Delegate(document.querySelector('.mypage__onboarding')); | |
var notificationContainer = document.querySelector('.notification-container'); | |
var notificationDelegate = new Delegate(notificationContainer); | |
notificationDelegate.on('click', '.notification-item__hide-button', function(e, el) { | |
notificationContainer.style.display = "none"; | |
}); | |
delegate.on('click', '.myft-ui--follow .myft-ui__button', function (ev, el) { | |
ev.preventDefault(); | |
var messageContainer = notificationContainer.querySelector('p'); | |
messageContainer.innerHTML = getNotificationHtml('Please subscribe or sign in to follow this topic.'); | |
notificationContainer.style.display = "block"; | |
}); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment