Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Surfer
  3. Is a non JS version possible? How to wget files?

Is a non JS version possible? How to wget files?

Scheduled Pinned Locked Moved Solved Surfer
22 Posts 5 Posters 3.4k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • nebulonN Away
    nebulonN Away
    nebulon
    Staff
    wrote on last edited by
    #8

    I've added basic support for file listing together with the <noscript> tag, which allows the usage of wget -r or also text based browsers like lynx.

    Conveniently it also removes one server roundtrip for the dynamic version as the template also injects the folder content with a <script> tag to pickup by the vuejs app.

    This is only for the public page so far and pending a surfer package release (hopefully tomorrow)

    If anyone is interested, the change is at https://github.com/cloudron-io/surfer/commit/4d70d060961422a50528c9186061d458d261aa3d

    I actually had a hard time to test this in firefox, since the noscript addon would simply not execute javascript, but ignores the <noscript> tag. Does anyone know how to test such a scenario?

    mehdiM jdaviescoatesJ 2 Replies Last reply
    2
    • nebulonN nebulon

      I've added basic support for file listing together with the <noscript> tag, which allows the usage of wget -r or also text based browsers like lynx.

      Conveniently it also removes one server roundtrip for the dynamic version as the template also injects the folder content with a <script> tag to pickup by the vuejs app.

      This is only for the public page so far and pending a surfer package release (hopefully tomorrow)

      If anyone is interested, the change is at https://github.com/cloudron-io/surfer/commit/4d70d060961422a50528c9186061d458d261aa3d

      I actually had a hard time to test this in firefox, since the noscript addon would simply not execute javascript, but ignores the <noscript> tag. Does anyone know how to test such a scenario?

      mehdiM Offline
      mehdiM Offline
      mehdi
      App Dev
      wrote on last edited by
      #9

      @nebulon What I do in this case is not put the elements destined for non-JS environment in a noscript tag, but rather just put them at the root of the element that's gonna be the Vue.JS app. So, as soon as Vue.JS takes over, it disappears.

      nebulonN 1 Reply Last reply
      1
      • mehdiM mehdi

        @nebulon What I do in this case is not put the elements destined for non-JS environment in a noscript tag, but rather just put them at the root of the element that's gonna be the Vue.JS app. So, as soon as Vue.JS takes over, it disappears.

        nebulonN Away
        nebulonN Away
        nebulon
        Staff
        wrote on last edited by
        #10

        @mehdi thats kinda smart, I have to see how much flickering that adds to the UI as such, but otherwise I think I'd prefer your solution.

        1 Reply Last reply
        1
        • nebulonN nebulon

          I've added basic support for file listing together with the <noscript> tag, which allows the usage of wget -r or also text based browsers like lynx.

          Conveniently it also removes one server roundtrip for the dynamic version as the template also injects the folder content with a <script> tag to pickup by the vuejs app.

          This is only for the public page so far and pending a surfer package release (hopefully tomorrow)

          If anyone is interested, the change is at https://github.com/cloudron-io/surfer/commit/4d70d060961422a50528c9186061d458d261aa3d

          I actually had a hard time to test this in firefox, since the noscript addon would simply not execute javascript, but ignores the <noscript> tag. Does anyone know how to test such a scenario?

          jdaviescoatesJ Offline
          jdaviescoatesJ Offline
          jdaviescoates
          wrote on last edited by
          #11

          @nebulon sounds like you're making great progress, thanks!

          I use Cloudron with Gandi & Hetzner

          nebulonN 1 Reply Last reply
          0
          • jdaviescoatesJ jdaviescoates

            @nebulon sounds like you're making great progress, thanks!

            nebulonN Away
            nebulonN Away
            nebulon
            Staff
            wrote on last edited by
            #12

            @jdaviescoates I published a new version 5.16.0 which has basic noscript support.
            I decided against @mehdi 's suggestion, since the UI flicker during folder navigation was a bit too much. Generally I would have preferred that though.

            jdaviescoatesJ 1 Reply Last reply
            2
            • nebulonN nebulon

              @jdaviescoates I published a new version 5.16.0 which has basic noscript support.
              I decided against @mehdi 's suggestion, since the UI flicker during folder navigation was a bit too much. Generally I would have preferred that though.

              jdaviescoatesJ Offline
              jdaviescoatesJ Offline
              jdaviescoates
              wrote on last edited by
              #13

              @nebulon great, thanks! I'll let that reddit thread know and see if the people who were having issues before are OK now 🙂

              I use Cloudron with Gandi & Hetzner

              jdaviescoatesJ 1 Reply Last reply
              1
              • jdaviescoatesJ jdaviescoates

                @nebulon great, thanks! I'll let that reddit thread know and see if the people who were having issues before are OK now 🙂

                jdaviescoatesJ Offline
                jdaviescoatesJ Offline
                jdaviescoates
                wrote on last edited by
                #14

                @nebulon I just tried doing wget -r myself and it worked perfectly! 😄

                However, if you e.g. install noscript extension and visit it you can't actually scroll down pages. 😕

                So even though it's now possible to wget the files (which is great, thanks!), it's still not possible to simply browse the files in a browser without javascript enabled.

                It'd be awesome if that could be made possible too!? 🙂

                I use Cloudron with Gandi & Hetzner

                mehdiM 1 Reply Last reply
                0
                • jdaviescoatesJ jdaviescoates

                  @nebulon I just tried doing wget -r myself and it worked perfectly! 😄

                  However, if you e.g. install noscript extension and visit it you can't actually scroll down pages. 😕

                  So even though it's now possible to wget the files (which is great, thanks!), it's still not possible to simply browse the files in a browser without javascript enabled.

                  It'd be awesome if that could be made possible too!? 🙂

                  mehdiM Offline
                  mehdiM Offline
                  mehdi
                  App Dev
                  wrote on last edited by
                  #15

                  @jdaviescoates NoScript is different from "a browser without javascript enabled". NoScript removes the script tags, but does not disable javascript. If you go to another browser, actually disable javascript in the preferences, it should work

                  jdaviescoatesJ 1 Reply Last reply
                  1
                  • mehdiM mehdi

                    @jdaviescoates NoScript is different from "a browser without javascript enabled". NoScript removes the script tags, but does not disable javascript. If you go to another browser, actually disable javascript in the preferences, it should work

                    jdaviescoatesJ Offline
                    jdaviescoatesJ Offline
                    jdaviescoates
                    wrote on last edited by
                    #16

                    @mehdi said in Is a non JS version possible? How to wget files?:

                    If you go to another browser, actually disable javascript in the preferences, it should work

                    I just tried that too, but it doesn't seem to work. Still can't scroll down pages e.g. https://library.uniteddiversity.coop/Cooperatives/

                    I use Cloudron with Gandi & Hetzner

                    1 Reply Last reply
                    0
                    • nebulonN Away
                      nebulonN Away
                      nebulon
                      Staff
                      wrote on last edited by
                      #17

                      As @mehdi mentiones the NoScript extension is not the right thing here, but if you go to about:config in Firefox and set javascript.enabled to false, then even without a browser restart you would see the static page instead. Haven't tested chrome based browser though.

                      jdaviescoatesJ 1 Reply Last reply
                      0
                      • nebulonN nebulon

                        As @mehdi mentiones the NoScript extension is not the right thing here, but if you go to about:config in Firefox and set javascript.enabled to false, then even without a browser restart you would see the static page instead. Haven't tested chrome based browser though.

                        jdaviescoatesJ Offline
                        jdaviescoatesJ Offline
                        jdaviescoates
                        wrote on last edited by
                        #18

                        @nebulon thanks, but even just doing that (and the equivalent in Chromium) it's not that I don't see the static page, I do. It's that you can't scroll down the page and browse files further down the page.

                        e.g. turn off javascript and go here: https://library.uniteddiversity.coop/Cooperatives/ and you can't get past here:

                        can't scroll down.png

                        I use Cloudron with Gandi & Hetzner

                        nebulonN 1 Reply Last reply
                        0
                        • jdaviescoatesJ jdaviescoates

                          @nebulon thanks, but even just doing that (and the equivalent in Chromium) it's not that I don't see the static page, I do. It's that you can't scroll down the page and browse files further down the page.

                          e.g. turn off javascript and go here: https://library.uniteddiversity.coop/Cooperatives/ and you can't get past here:

                          can't scroll down.png

                          nebulonN Away
                          nebulonN Away
                          nebulon
                          Staff
                          wrote on last edited by
                          #19

                          @jdaviescoates well that is the basic noscript page for now. I guess it is not sorted nor gives indication of the filetype, yet.

                          jdaviescoatesJ 1 Reply Last reply
                          0
                          • nebulonN nebulon

                            @jdaviescoates well that is the basic noscript page for now. I guess it is not sorted nor gives indication of the filetype, yet.

                            jdaviescoatesJ Offline
                            jdaviescoatesJ Offline
                            jdaviescoates
                            wrote on last edited by
                            #20

                            @nebulon said in Is a non JS version possible? How to wget files?:

                            I guess it is not sorted nor gives indication of the filetype, yet.

                            Well, it looks like it is sorted alphabetically anyway and you can see the filetype anyway from the filename.

                            Just can't scroll down the page.

                            But you've solved the primary issue of not being able to wget the files so thanks for that.

                            I use Cloudron with Gandi & Hetzner

                            nebulonN 1 Reply Last reply
                            0
                            • jdaviescoatesJ jdaviescoates

                              @nebulon said in Is a non JS version possible? How to wget files?:

                              I guess it is not sorted nor gives indication of the filetype, yet.

                              Well, it looks like it is sorted alphabetically anyway and you can see the filetype anyway from the filename.

                              Just can't scroll down the page.

                              But you've solved the primary issue of not being able to wget the files so thanks for that.

                              nebulonN Away
                              nebulonN Away
                              nebulon
                              Staff
                              wrote on last edited by
                              #21

                              @jdaviescoates oh you were referring to scrolling! Have to see which css needs tweaking to support both cases then.

                              jdaviescoatesJ 1 Reply Last reply
                              3
                              • nebulonN nebulon

                                @jdaviescoates oh you were referring to scrolling! Have to see which css needs tweaking to support both cases then.

                                jdaviescoatesJ Offline
                                jdaviescoatesJ Offline
                                jdaviescoates
                                wrote on last edited by
                                #22

                                @nebulon said in Is a non JS version possible? How to wget files?:

                                @jdaviescoates oh you were referring to scrolling!

                                Yes!

                                Have to see which css needs tweaking to support both cases then.

                                That'd be great! 🙂

                                I use Cloudron with Gandi & Hetzner

                                1 Reply Last reply
                                0
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • Bookmarks
                                • Search