In a while, the JSON blocks will be described on this page. The JSON block acts as an alternative to a fully blown API and is supposed to act either as a backup or an "offline solution" to the filtering. You can take a look at the link below, to see how the sample data currently looks.

https://json.giraffe-project.org/

How does it work?

The blocks of JSON is what's configured in the synchronized chrome store. This block can be exported - and is automatically - through the mini control panel that we use to set things up. If we set this up as an import function, you can easily share data with others by just pasting in straight into the box. Currently, this is how we use to test our data, since there is no automation API that we can import from.

Actions

Actions are currently separated on the following criterias:

action namedescription
notify

The simplest way of using the plugin. Adds notes to an element that are covered by the content detection.

To attach the "notification" to a specific element, the flows json-object can be assigned a "attachto"-value.

Default

removeThe opposite of notify. Simply removes the element and leaves no traces.
replaceReplace the entire element with new data. The "new" data is the content normally published in the notify-object.
thumbnail

Coming soon.

Will try to remove thumbnails instead of whole elements, so shares can be visible without the share itself.

hide

Coming soon.

Instead of removing an element, we can choose to hide it. This opens for unhiding elements.

Mockdata - Element Flow Rules

This is the block which defines rules for each site configured.

Element Flow Rules Example
{
    "flows": {
        "facebook.com": {
            "comments": {},
            "posts": {
                "element": ".userContentWrapper",
                "parents": 1,
                "action": "replace"
            }
        },
        "dn.se": {
            "campaign": {
                "element": "campaign-holder"
            },
            "paywall": {
                "element": "paywall"
            }
        }
    }
}

Mockdata - API Content

This is the block that we use to categorize our analyzed data. This is actually a long time preparation for the ability to warn for "satire" content. By defining a more advanced interface from the beginning of this project, we should how to not require a complete rewrite of upcoming data.

Content Data that usually should be fetched from an API
{
    "categories": {
        "rightWing": {
            "description": "Right wing politics.",
            "names": {
                "/nyheteridag.se": "Nyheter Idag",
                "/friatider.se": "Fria Tider",
                "/samnytt.se": "Samhallsnytt"
            }
        },
        "leftWing": {
            "description": "Left wing politics",
            "names": {}
        },
        "regularMedia": {
            "description": "What we define as independent media.",
            "names": {
                "expressen.se": "Expressen",
                "aftonbladet.se": "Aftonbladet",
                "dn.se": "Dagens Nyheter",
                "svt.se": "Sveriges Television"
            },
            "action": "replace"
        }
    }
}
  • No labels