Skip to content

Instantly share code, notes, and snippets.

View Sancus's full-sized avatar

Andrei Sancus

  • Mozilla
  • Vancouver, British Columbia
View GitHub Profile
@Sancus
Sancus / langpack_upload.py
Created April 8, 2022 04:31
Upload language packs to addons.thunderbird.net
import datetime
import glob
import jwt
import random
import requests
import string
import time
from pathlib import Path
# Example download command:
@Sancus
Sancus / bootstrap.js
Created July 7, 2018 23:39
Modify prefs to test addons.thunderbird.net
Components.utils.import("resource://gre/modules/Services.jsm");
function install(aData, aReason) {
Services.prefs.setCharPref("extensions.getAddons.link.url", "https://addons.thunderbird.net/%LOCALE%/%APP%/")
Services.prefs.setCharPref("extensions.getAddons.recommended.url", "https://services.addons.thunderbird.net/%LOCALE%/%APP%/api/%API_VERSION%/list/recommended/all/%MAX_RESULTS%/%OS%/%VERSION%?src=thunderbird")
Services.prefs.setCharPref("extensions.getAddons.search.browseURL", "https://addons.thunderbird.net/%LOCALE%/%APP%/search/?q=%TERMS%")
Services.prefs.setCharPref("extensions.getAddons.search.url", "https://services.addons.thunderbird.net/%LOCALE%/%APP%/api/%API_VERSION%/search/%TERMS%/all/%MAX_RESULTS%/%OS%/%VERSION%/%COMPATIBILITY_MODE%?src=thunderbird")
Services.prefs.setCharPref("extensions.getAddons.themes.browseURL", "https://addons.thunderbird.net/%LOCALE%/thunderbird/themes/?src=thunderbird")
Services.prefs.setCharPref("extensions.update.background.url", "https://versioncheck-bg.
package main
import (
"encoding/json"
"fmt"
"github.com/PuerkitoBio/goquery"
"net/http"
)
type PageData struct {