FANDOM


Namespace Railgun.FriendsList

A wrapper object around all properties and methods that make up the Friend's List module. The friends property of this object has a counterpart in localStorage.

Field Summary
Field AttributesField Name and Description
<static> <constant>  
Railgun.FriendsList.addFriendProfileImage
HTML code for the add friend button that appears on profile mastheads.
<static>  
Railgun.FriendsList.friends
An array of objects representing all of the user's friends, initialized in Railgun.initProcessServerResponse() and kept sorted by username in the addFriend() method.
<static> <constant>  
Railgun.FriendsList.noFriendsMessage
HTML code for the message which is displayed to the user when the Friend's List is empty.
<static> <constant>  
Railgun.FriendsList.removeFriendProfileImage
HTML code for the remove friend button that appears on profile mastheads.

Method Summary

Method AttributesMethod Name and Description
<static>  
Railgun.FriendsList.addFriend()
Adds a single friend to the Friend's List upon clicking the add friend button and issues a request to save the updated friends array to localStorage.
<static>  
Railgun.FriendsList.createFriendHTML(username)
Creates a table row element for a single friend to be added to the Friend's List.
<static>  
Railgun.FriendsList.init()
Initialization method for the Friend's List module.
<static>  
Railgun.FriendsList.removeFriend()
Removes a single friend from the Friend's List upon clicking the remove friend button and issues a request to save the updated friends array in localStorage.
<static>  
Railgun.FriendsList.toggleLinks(element, show)
Shows friend's links on mouseover and hides them again on mouseout.

Field Detail

<static> <constant> {String}Railgun.FriendsList.addFriendProfileImage
HTML code for the add friend button that appears on profile mastheads. This message has the railgun-add-friend-image CSS class, and is initialized in the Railgun.FriendsList.init() method.
See:
Railgun.FriendsList.init()
<static> {Array}Railgun.FriendsList.friends
An array of objects representing all of the user's friends, initialized in Railgun.initProcessServerResponse() and kept sorted by username in the addFriend() method. Each element of the array is an object of the form: { homewiki : "http://mathmagician.wikia.com", html : 'tr ... /tr', username : "Mathmagician" }
See:
Railgun.initProcessServerResponse
<static> <constant> {String}Railgun.FriendsList.noFriendsMessage
HTML code for the message which is displayed to the user when the Friend's List is empty. This message has the railgun-no-friends-message CSS class, and is initialized in the Railgun.FriendsList.init() method.
See:
Railgun.FriendsList.init()
<static> <constant> {String}Railgun.FriendsList.removeFriendProfileImage
HTML code for the remove friend button that appears on profile mastheads. This message has the railgun-remove-friend-image CSS class, and is initialized in the Railgun.FriendsList.init() method.
See:
Railgun.FriendsList.init()

Method Detail

  • <static> Railgun.FriendsList.addFriend()
    Adds a single friend to the Friend's List upon clicking the add friend button and issues a request to save the updated friends array to localStorage. This method sorts Railgun.FriendsList.friends alphabetically by username and does not permit duplicates.
    See:
    Railgun.FriendsList.addFriendProfileImage
    Railgun.FriendsList.friends
  • <static> {String}Railgun.FriendsList.createFriendHTML(username)
    Creates a table row element for a single friend to be added to the Friend's List.
    Parameters:
    {String} username
    name of a Wikia user, such as "Mathmagician"
    Returns:
    {String} a table row HTML element with the railgun-friend-tr CSS class.
  • <static> Railgun.FriendsList.init()
    Initialization method for the Friend's List module. This method initializes the friends property and creates the visual representation of the module on the siderail.
  • <static> Railgun.FriendsList.removeFriend()
    Removes a single friend from the Friend's List upon clicking the remove friend button and issues a request to save the updated friends array in localStorage.
    See:
    Railgun.FriendsList.friends
  • Shows friend's links on mouseover and hides them again on mouseout.
    Parameters:
    {Object} element
    a table row element containing HTML for a single friend
    {Boolean} show
    true to show links, false to hide them
Documentation generator: JsDoc Toolkit 2.4.0
Template: Codeview 1.2
Generated on: 2012-5-30 23:16

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.