Revision 58739
Added by Argiro Kokogiannaki almost 4 years ago
HelperFunctions.class.ts | ||
---|---|---|
1 | 1 |
export class HelperFunctions { |
2 | 2 |
|
3 | 3 |
public static scroll() { |
4 |
HelperFunctions.scrollTo(0,0); |
|
5 |
} |
|
6 |
public static scrollTo(x,y) { |
|
4 | 7 |
if (typeof document !== 'undefined') { |
5 |
window.scrollTo(0, 0);
|
|
8 |
window.scrollTo(x,y);
|
|
6 | 9 |
} |
7 | 10 |
} |
8 | 11 |
|
12 |
public static scrollToId(elementId:string) { |
|
13 |
if (typeof document !== 'undefined' && document.getElementById(elementId)) { |
|
14 |
document.getElementById(elementId).scrollIntoView(); |
|
15 |
} |
|
16 |
} |
|
9 | 17 |
public static isTiny(url: string) { |
10 | 18 |
return (url.indexOf('tinyurl.com') !== -1); |
11 | 19 |
} |
Also available in: Unified diff
[Library|Trunk]
Search Pages:
Filters:
Results:
Remove Collected From Filter "collectedfrom","collectedfrom"
Project appears when funder is selected
Repositories: add Collected From Filter "collectedfromname"