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
var posts = document.getElementsByClassName("userContent"); | |
var strings2block = ["buzz","feed","buzzfeed"] | |
var doesPostContainBlock = function(postContent, blockContent){ | |
for (y in blockContent){ | |
if(postContent.search(blockContent[y])>0) | |
return true; | |
} | |
return false; | |
} |
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
updateWidget: function(e){ | |
//should be able to replace all these if statements by accessing the variable being changed which is identical to the target's name attribute | |
if(e.target.getAttribute("name")=="name"){ | |
this.state.widget.setState({name: e.target.value}); | |
return false; | |
} | |
else if(e.target.getAttribute("name")=="phone"){ | |
this.state.widget.setState({phone: e.target.value}); | |
return false; | |
} |
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
var songs = document.getElementsByClassName("track-list ui-sortable")[1].children; | |
var final = ""; | |
var trackInfo = ""; | |
var artistName = ""; | |
var trackName = ""; | |
for (var track=0;track<songs.length;track++) { | |
trackInfo = songs[track].getElementsByClassName("track-info")[0]; | |
artistName = trackInfo.getElementsByClassName("album-name")[0].textContent.trim(); | |
trackName = trackInfo.getElementsByClassName("name")[0].textContent.trim(); | |
final += artistName + " - " + trackName + "\n"; |
NewerOlder