~justinmcp/unity-webapps-twitter/fix-module-imports

« back to all changes in this revision

Viewing changes to Twitter.user.js

  • Committer: Tarmac
  • Author(s): Robert Bruce Park
  • Date: 2013-06-18 06:09:43 UTC
  • mfrom: (13.2.3 packaging-fixups)
  • Revision ID: tarmac-20130618060943-bk4pwad1slkxp4p3
Minor packaging fixups.

Approved by PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
// ==/UserScript==
5
5
 
6
6
// This placeholder gets munged with real data at build time.
7
 
const WebappsGettextDict = JSON.parse(unescape(
 
7
var WebappsGettextDict = JSON.parse(unescape(
8
8
    "%7B%22GETTEXT%22%3A%22PLACEHOLDER%22%7D"
9
9
));
10
10
 
11
11
window.Unity = external.getUnityObject(1);
12
12
 
13
 
/**
14
 
 * Validates the page for functional tests.
15
 
 *
16
 
 */
17
 
function selfTest() {
18
 
    if (!getProfileLinkNode() || !getProfileLinkNode().href) {
19
 
        return;
20
 
    }
21
 
    if (!checkMessagesCount().length) {
22
 
        return;
23
 
    }
24
 
 
25
 
    reportTestState('PASS SELF TEST');
26
 
};
27
 
 
28
13
function getProfileLinkNode() {
29
14
    return document.evaluate('//a[@data-nav="profile"]', document, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue;
30
15
}
68
53
    return indicators;
69
54
}
70
55
 
 
56
/**
 
57
 * Validates the page for functional tests.
 
58
 *
 
59
 */
 
60
function selfTest() {
 
61
    if (!getProfileLinkNode() || !getProfileLinkNode().href) {
 
62
        return;
 
63
    }
 
64
    if (!checkMessagesCount().length) {
 
65
        return;
 
66
    }
 
67
 
 
68
    reportTestState('PASS SELF TEST');
 
69
}
 
70
 
71
71
function messagingIndicatorSetup() {
72
72
    var indicatorsController = new Indicators(checkMessagesCount, true);
73
73
    indicatorsController.visited(currentIndicator);