File tree Expand file tree Collapse file tree 2 files changed +17
-13
lines changed
Expand file tree Collapse file tree 2 files changed +17
-13
lines changed Original file line number Diff line number Diff line change 2323 < hr style ="border: none; height: 1.5rem " />
2424 < div class ="sectionwrap ">
2525 < div class ="news ">
26- < div class ="note blue ">
27- < h3 > ScratchTools is Going Multilingual!</ h3 >
28- < span
29- > ScratchTools is becoming available in even more languages! Our
30- beta version supports Polish and Russian, and more languages such
31- as Spanish, Turkish, German and Japanese are coming soon! If you
32- know a language other than English, you can help translate and get
33- credit for it
34- < a href ="https://explore.transifex.com/scratchtools/scratchtools/ "
35- > here</ a
36- > !</ span
37- >
38- </ div >
3926 </ div >
4027 < br />
4128 < div class ="note purple blocked " style ="display: none ">
Original file line number Diff line number Diff line change @@ -1044,4 +1044,21 @@ async function parseFile(file) {
10441044function importSettingsInput ( ) {
10451045 var input = document . querySelector ( ".settings-load-input" )
10461046 input . click ( )
1047+ }
1048+
1049+ if ( document . querySelector ( ".news" ) ) {
1050+ getNews ( )
1051+ }
1052+
1053+ async function getNews ( ) {
1054+ var data = await ( await fetch ( "https://data.scratchtools.app/news/" ) ) . json ( )
1055+ var note = document . createElement ( "div" )
1056+ note . className = "note blue"
1057+ var h3 = document . createElement ( "h3" )
1058+ h3 . textContent = data . title
1059+ var span = document . createElement ( "span" )
1060+ span . innerHTML = data . description
1061+ note . appendChild ( h3 )
1062+ note . appendChild ( span )
1063+ document . querySelector ( ".news" ) . appendChild ( note )
10471064}
You can’t perform that action at this time.
0 commit comments