GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

const origToString = String.prototype.toString String.prototype.toString = function() { const str = origToString.call(this) if (str === 'meow') return ':3' return 'lol' } > "meow".toString() < ':3' > "lmao".toString() < 'lol'

Download link

https://very.stupid.fish/files/bbd61c08-3968-40d7-86ab-334dd74e67f7

Notices where this attachment appears

  1. Embed this notice
    alina 🌸 (teidesu@very.stupid.fish)'s status on Saturday, 03-Feb-2024 04:52:50 JST alina 🌸 alina 🌸
    in reply to

    @lanodan@queer.hacktivis.me @piggo@piggo.space @domi@donotsta.re @iacore@mastodon.de that happened because within your .toString, this refers to a String object, and since == is a "loosely equal" operator, it implicitly calls .toString to coerce it to a primitive, resulting in an infinite loop

    and arrow function doesn't work because by definition arrow functions always use parent this, that's the main difference between them and function functions

    something like this works

    In conversation Saturday, 03-Feb-2024 04:52:50 JST from very.stupid.fish permalink
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.