-
Notifications
You must be signed in to change notification settings - Fork 69
Cleanup #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Cleanup #8
Changes from all commits
f53a14e
e0d7bda
a9f6b84
b677a09
ade873f
2bae8db
fb5ce2f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| build | ||
| dist | ||
| lcov | ||
| node_modules | ||
| node_modules |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ window.POG=(function() { | |
|
|
||
| // ======================================================================== | ||
| // private functions | ||
|
|
||
| function getAttributeSelector(name, node) { | ||
| var response = ''; | ||
| var value = node.getAttribute(name); | ||
|
|
@@ -21,9 +21,21 @@ window.POG=(function() { | |
| else { | ||
| selector += '[' + name + '=\'' + value + '\']'; | ||
| } | ||
| if (document.querySelectorAll(selector).length === 1) { | ||
| response = selector; | ||
| } | ||
| //Surrounding with try to catch the exceptions that occur and crash the program on | ||
| //certain web pages. | ||
| try | ||
| { | ||
| if (document.querySelectorAll(selector).length === 1) { | ||
| response = selector; | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you might want to have a more nicer indentation, just to be consistent with the entire file
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi BogdanLivadariu. Can you tell me what you mean by the "Notify module". I am sure sure what you mean to specify. I can fix the indentation also. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @VaccinalBowl I was thinking it would be nice to throw errors directly at the user using:
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it. I'll integrate it when I get time. On Friday, 5 August 2016, Bogdan Livadariu [email protected] wrote:
|
||
| } | ||
| catch (e) { | ||
|
|
||
| console.log(e); | ||
| console.log("Bad selector: " + selector); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
maybe you could use the notify module to display what was the error that occurred, rather than hiding it under the rug(inside the dev-tools) |
||
| } | ||
|
|
||
|
|
||
| } | ||
|
|
||
| return response; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Hello from the other side. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these empty spaces can go out