Skip to content

Instantly share code, notes, and snippets.

View elbotho's full-sized avatar
🌋

Botho elbotho

🌋
View GitHub Profile
@elbotho
elbotho / example.json
Created November 3, 2023 09:40
grouped exercise static state example
{
"id": 0,
"revision": 0,
"changes": "",
"content": "{\"plugin\":\"rows\",\"state\":[{\"plugin\":\"text\",\"state\":[{\"type\":\"p\",\"children\":[{\"text\":\"ExGroup Task\"}]}],\"id\":\"415b5666-b38a-43e6-b3ae-2965dc6e9ae2\"}],\"id\":\"b480e34f-9a7f-4f33-b8fd-5f6eeaa869d5\"}",
"cohesive": false,
"grouped-text-exercise": [
{
"id": 0,
"revision": 0,
@elbotho
elbotho / squarespace_umlauts_hack.js
Created October 15, 2018 16:57
Squarespace search umlauts hack
//until the bug gets fixed this kinda works
document.addEventListener("DOMContentLoaded", function() {
setTimeout(setupSearchFix, 1200);
});
function setupSearchFix(){
var if( $('.sqs-search-page .sqs-search-page-input input').length === 0 ) return;
console.log('squarespace search-fix');
@elbotho
elbotho / functions.php
Last active January 18, 2022 13:02
FacetWP little helper to find active facets from php
<?php
//helper in functions.php
function my_get_facet_vars(){
$vars = [];
foreach ($_GET as $key => $value) {
$pos = strpos($key, 'fwp_');
if ($pos == 0) {
$key = str_replace("fwp_", "", $key);
$vars[$key] = $value;