We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Total Complexity | 2 |
| Complexity/F | 2 |
| Lines of Code | 15 |
| Function Count | 1 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | /** |
||
| 5 | function tryInject() { |
||
| 6 | var widget = $("iframe#twitter-widget-0"); |
||
| 7 | if (widget.length == 0) { |
||
|
|
|||
| 8 | // If the iframe hasn't loaded yet, rerun this function again before |
||
| 9 | // the next repaint. |
||
| 10 | window.requestAnimationFrame(tryInject); |
||
| 11 | } else { |
||
| 12 | // Inject scrollbar CSS into the iframe (webkit only). |
||
| 13 | widget.contents().find('head').append('<style>::-webkit-scrollbar { width: 10px; } ::-webkit-scrollbar-track { -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.8); border-radius: 10px; } ::-webkit-scrollbar-thumb { border-radius: 10px; -webkit-box-shadow: inset 0 0 6px rgba(128,200,112,1); }</style>'); |
||
| 14 | // Unhide the twitter feed element. |
||
| 15 | $("td#twitter-feed").removeClass("hide"); |
||
| 16 | } |
||
| 17 | } |
||
| 18 | |||
| 19 | tryInject(); |
||
| 20 |