minecraft

dragongirl funky fresh

april et al, several flavors of therian (plural edition)
engineer in training by day, furry artist and "web developer" also by day
adult, occasionally nsfw on main
💜@dragongirlcloaca💜
💜@8akesale💜
avatar by karvakera

last.fm recent played


find me elsewhere
floofy.tech/@starlight

posts from @minecraft tagged #ravenposting

also:

Seven-Cute-Fish
@Seven-Cute-Fish asked:

what's your favorite weird hack or cursed code you've written?

i don't think i have any especially crazy examples but there are some silly ones!

this was more the work of @twilight-sparkle, but the dashboard unfucker userscript (which was a bit cursed in its own right) modified feature flags by stealing window property real estate before tumblr could get to it.

Object.defineProperty(window, '___INITIAL_STATE___', { // thanks twilight-sparkle-irl!
    set (x) {
      state = x;
    },
    get () {
      try {
        return {
          ...state,
          Dashboard: modifyInitialTimeline(state.Dashboard, 'dashboard'),
          PeeprRoute: modifyInitialTimeline(state.PeeprRoute, 'peepr'),
          obfuscatedFeatures: modifyObfuscatedFeatures(state.obfuscatedFeatures, featureSet)
        };
      } catch (e) {
        console.error('Failed to modify features', e);
      }
      return state;
    },
    enumerable: true,
    configurable: true
  });
syntax highlighting by codehost because i'm too lazy to configure my own prismjs right now

also on the subject of dashboard unfucker the content width function was an unholy mess of event listeners and content size math but it was 100% responsive in real time and would actively update the right and left margins as the document size changed WHILE keeping the same relative horizontal positioning, something that i straight up couldn't replicate in dashboard plus because the newest redpop layout is such a trash fire of useless nesting containers that i couldn't find a css hack to make it not overflow or break in some way

i've mentioned this before but the current api method that chutils uses to arbitrarily fetch data for a project (without something to copy react props from) is via the search api because it's faster than all of the other methods i've tried (the "slow method" is just fetching the html page and copying the initial state from that).

/**
 * fetches info for a project
 * @param {string} handle 
 * @returns {Promise <object>} project info for the given handle 
 */
export const getProject = async handle => {
  if (!projectMap.has(handle)) {
    try {
      const [{ projects }] = await batchTrpc(['projects.searchByHandle'], { 0: { query: handle, skipMinimum: false } }); // the search function is currently the fastest way to get info from a handle. it's stupid, i know
      const project = projects.find(p => p.handle === handle);
      projectMap.set(handle, project);
    } catch (e) {
      console.warn('search method failed, attempting slow method', e);
      projectMap.set(handle, await getProjectSlow(handle));
    }
  }

  return projectMap.get(handle);
};
syntax highlighting by codehost because i'm too lazy to configure my own prismjs right now


nintendo fans: if squirklet pro deluxe mini isn't on this month's nintendo switch premium online GBA drop this month i'm going to have to write a strongly-worded tweet and then delete it

nintendo: $100 sounds right for a standard definition port of an abandonware game, right?

permanently-on nintendo switch i keep in an unventilated charging cabinet so i don't have to boot into firmware on startup: im so haut