Merge lp:~zaspire/unity-webapps-linkedin/new-design into lp:unity-webapps-linkedin

Proposed by Maxim Ermilov
Status: Merged
Merged at revision: 46
Proposed branch: lp:~zaspire/unity-webapps-linkedin/new-design
Merge into: lp:unity-webapps-linkedin
Diff against target: 72 lines (+2/-35)
2 files modified
LinkedIn.test.js (+0/-9)
LinkedIn.user.js (+2/-26)
To merge this branch: bzr merge lp:~zaspire/unity-webapps-linkedin/new-design
Reviewer Review Type Date Requested Status
Alexandre Abreu (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+168115@code.launchpad.net

Commit message

LinkedIn has been redesigned and the userscript needs fixing.

Description of the change

LinkedIn has been redesigned and fix the userscript accordingly.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:46
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~zaspire/unity-webapps-linkedin/new-design/+merge/168115/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/unity-webapps-linkedin-ci/1/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-webapps-linkedin-saucy-amd64-ci/1/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-webapps-linkedin-saucy-armhf-ci/1/console

Click here to trigger a rebuild:
http://s-jenkins:8080/job/unity-webapps-linkedin-ci/1/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote :

Good, it even simplifies the whole dependancies over the website's structure.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'LinkedIn.test.js'
2--- LinkedIn.test.js 2013-04-30 20:41:39 +0000
3+++ LinkedIn.test.js 2013-06-07 16:02:35 +0000
4@@ -31,15 +31,6 @@
5
6 // at least one
7 assertEquals('Unity.addAction', log[3].func, 'Unity.addAction');
8-
9- // validate self test results
10- var found = false, i;
11- for (i = 0; i < out.length; i++) {
12- if (out[i] === 'PASS SELF TEST') {
13- found = true;
14- }
15- }
16- assertTrue('PASS SELF TEST', found);
17 },
18
19 scriptName: 'LinkedIn.user.js'
20
21=== modified file 'LinkedIn.user.js'
22--- LinkedIn.user.js 2013-05-01 22:46:29 +0000
23+++ LinkedIn.user.js 2013-06-07 16:02:35 +0000
24@@ -11,26 +11,6 @@
25
26 window.Unity = external.getUnityObject(1);
27
28-/**
29- * User script self validation
30- *
31- * Called by the testing framework to make sure that
32- * the page layout seems ok.
33- */
34-function selfTest() {
35- if (!getComposeNewMessageClickTargetNode()) {
36- return;
37- }
38-
39- // We are done
40- reportTestState('PASS SELF TEST');
41-}
42-
43-function getComposeNewMessageClickTargetNode() {
44- return document.evaluate('//li[@id="nav-primary-inbox"]/ul/li[3]/a',
45- document, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue;
46-};
47-
48 function isCorrectPage() {
49 var i, ids = ['header'];
50
51@@ -60,7 +40,7 @@
52
53 for (i = 0; i < snapshot.snapshotLength; i++) {
54 var node = snapshot.snapshotItem(i);
55- var text = node.getElementsByTagName('a')[0].getElementsByTagName('span')[0].textContent;
56+ var text = trim(node.getElementsByTagName('a')[0].textContent);
57 var link = node.getElementsByTagName('a')[0].href;
58
59 console.log(text);
60@@ -84,12 +64,8 @@
61 }
62 var indicatorsController = new Indicators(checkMessagesCount);
63
64- function composeNewMessage() {
65- var node = getComposeNewMessageClickTargetNode();
66- launchClickEvent(node);
67- }
68 Unity.Launcher.addAction(_("Compose New Message"),
69- wrapCallback(composeNewMessage));
70+ makeRedirector("http://www.linkedin.com/msgToConns?displayCreate="));
71
72 doMatrixIntegration();
73

Subscribers

People subscribed via source and target branches

to all changes: