• Activity
  • Votes
  • Comments
  • New
  • All activity
  • Showing only topics with the tag "javascript". Back to normal view
    1. Angular with PureScript

      I have to do an assignment for university soon-ish, and it requires Angular. I'm not very fond of that framework specifically, but I would be interested in making it more interesting as a learning...

      I have to do an assignment for university soon-ish, and it requires Angular. I'm not very fond of that framework specifically, but I would be interested in making it more interesting as a learning project. I've also recently discovered PureScript, which I have no experience with right now.

      Searching online, I've purescript-angular, which hasn't been updated in years. I also couldn't find much else. Of course, I may be missing something simple (for instance, it's actually supported by default in Angular these days), so I wanted to ask if any of you know if this is possible, and if so, how?

      6 votes
    2. Feedback wanted on website/dev project

      Hello ~comp, I've been learning web development in my spare time with the hopes of one day becoming a professional web developer. This is my latest project:...

      Hello ~comp,

      I've been learning web development in my spare time with the hopes of one day becoming a professional web developer.

      This is my latest project: https://github.com/farleykreynolds/toptenify. It's a small static site that pulls your listening data from the Spotify API.

      I welcome any feedback on the design, code, or any other aspect of the project. Thank you!

      6 votes
    3. Extended Scripts for Tildes Alpha

      So, after a rather clunky script to open comment's link in a new tab with the left click, I got inspired by the idea of @kalebo and wrote also a script to quickly jump to new comments in a topic....

      So, after a rather clunky script to open comment's link in a new tab with the left click, I got inspired by the idea of @kalebo and wrote also a script to quickly jump to new comments in a topic.

      I thought about writing a dedicated script but felt like it was going to become overly complicated for a user to import different script.

      These script are all meant to give the community some QoL while lightening the pressure on @deimos so he can work without too much stress from all the requests. As soon as the feature are implemented you should get rid of those script that in some parts felt like bad hacks to me that I was writing it.

      I know the button to scroll to new messages is in a quite bad position (top center of your browser page) but I couldn't bear to deal with tampermonkey issue and its GM_AddStyle meta not working properly so I had to use the basic CSS provided by spectre already loaded in tildes.net.

      If someone knows how to figure out that goddamn meta, let me know.

      ========= UPDATE ============

      Edit: So apparently tampermonkey has issues with styles that are not yet fixed and firefox has some issue in general with script that inject stuff in the page (understandably).

      For tampermonkey the solution is simple. Use violentmonkey instead. you can just copy the script and it will work.

      For Firefox it's a little more dirty unfortunately but I cannot find other solutions. You need to open the internal URL about:config. Then search security.csp.enable and double click to disable it. After this the script will work.
      Firefox has a very strict policy and the only real solution would be to write an extension and I don't think it's worth the effort in the current state of development.
      For full description of what that policy does, check the official doc from mozilla: https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP#Threats

      12 votes
    4. Script to jump to unread comments in a post

      Okay, so I got tired of scrolling through some of the long comment chains looking for that flash of orange that indicates a new post so I slapped together this solution. It's not pretty nor...

      Okay, so I got tired of scrolling through some of the long comment chains looking for that flash of orange that indicates a new post so I slapped together this solution. It's not pretty nor frictionless to use, but it's less annoying for me than scrolling for days just to find the new comments.

      Basic usage is to open the javascript console or scratch pad (e.g., Shift+F4 in Firefox) in your browser, paste in the following line from the code block and run it. It scrolls to the first unread comment and marks it as read; on subsequent runs it will do the same thing for the next unread comment and so on. You will need to enable new comment tracking in your Tildes preferences as well if you haven't done so yet.

      {var comment = document.getElementsByClassName("is-comment-new")[0]; if (comment != null) {comment.scrollIntoView(); comment.className = "comment"}}
      

      I had hoped that I could make it into a bookmarklet but unfortunately CSP nixes that option. If anyone else knows of a better way to do this let me know.

      10 votes