Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@

# logs
geckodriver.log

# Local build outputs
*.xpi
*.zip

# Local captured exports
*.ndjson
20 changes: 20 additions & 0 deletions FORK-NOTICE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Pesquisa Social Fork Notice

This project is a modified fork of Zeeschuimer.

Original project:
- Zeeschuimer
- Copyright (c) Stijn Peeters
- Original repository: https://github.com/digitalmethodsinitiative/zeeschuimer

This fork contains local modifications by Danilo F. Marinho and is distributed
with the obligations of the Mozilla Public License 2.0.

MPL 2.0 compliance notes:
- Files derived from the original MPL-covered code remain under MPL 2.0.
- Original copyright and license notices must be preserved.
- If this extension is distributed in executable form, the corresponding source
code for the MPL-covered files must also be made available.

Fork contact:
- danilo-f.marinho@hotmail.com
14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,10 @@ be exported as a JSON file or exported to a [4CAT](https://github.com/digitalmet
analysis and storage. Zeeschuimer is primarily intended as a companion to 4CAT, but you can also integrate its output
into your own analysis pipeline.

Currently, it supports the following platforms:
This fork currently supports the following platforms:
* [TikTok](https://www.tiktok.com) (posts and comments)
* [Instagram](https://www.instagram.com) (posts only)
* [X/Twitter](https://www.x.com)
* [LinkedIn](https://www.linkedin.com)
* [9gag](https://9gag.com)
* [Imgur](https://imgur.com)
* [Douyin](https://douyin.com)
* [Gab](https://gab.com)
* [Truth Social](https://truth.social)
* [Pinterest](https://pinterest.com)
* [RedNote/Xiaohongshu](https://xiaohongshu.com)
* [Instagram](https://www.instagram.com) (posts, reels, and comments)
* [X/Twitter](https://www.x.com) (posts and comments)

Platform support requires regular maintenance to keep up with changes to the platforms. If something does not work, we
welcome issues and pull requests. See 'Limitations' below for some known limitations to data capture.
Expand Down
56 changes: 56 additions & 0 deletions SOURCE-CODE-README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Source Code Package for Mozilla Review

This archive contains the source code used to build the Firefox extension
"Pesquisa Social".

## Extension identity

- Add-on name: Pesquisa Social
- Add-on ID: pesquisa-social@local
- Fork contact: danilo-f.marinho@hotmail.com

## Origin and license

This project is a modified fork of Zeeschuimer.

- Original project: https://github.com/digitalmethodsinitiative/zeeschuimer
- Original copyright: Stijn Peeters
- License for MPL-covered files: Mozilla Public License 2.0

See these files in the source package:

- `LICENSE`
- `FORK-NOTICE.md`

## Build environment

- Operating system used to produce the submitted package: Windows
- Shell used: PowerShell
- Archive/build script: `build-xpi.ps1`
- Required software: PowerShell with .NET support for `System.IO.Compression`

No Node.js bundling, transpilation, or webpack build is required for this
extension package.

## How to reproduce the submitted XPI

1. Extract this source code package.
2. Open PowerShell in the project root.
3. Run:

```powershell
powershell -ExecutionPolicy Bypass -File .\build-xpi.ps1
```

4. The script creates:

```text
pesquisa-social-v1.13.9.xpi
```

## Notes for reviewers

- The package includes third-party assets already present in the repository,
such as Font Awesome and font files.
- The submitted extension package excludes local data exports and other build
artifacts such as `.ndjson`, `.xpi`, and `.zip` files.
61 changes: 61 additions & 0 deletions build-source-zip.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Add-Type -AssemblyName System.IO.Compression
Add-Type -AssemblyName System.IO.Compression.FileSystem

$manifest = Get-Content "manifest.json" | ConvertFrom-Json
$version = $manifest.version
$output = "pesquisa-social-source-v$version.zip"
$root = (Get-Location).Path

$includePaths = @(
"manifest.json",
"popup",
"js",
"modules",
"images",
"fonts",
"inc",
"LICENSE",
"README.md",
"FORK-NOTICE.md",
"SOURCE-CODE-README.md",
"build-xpi.ps1"
)

if (Test-Path $output) {
Remove-Item -LiteralPath $output -Force
}

$zip = [System.IO.Compression.ZipFile]::Open($output, [System.IO.Compression.ZipArchiveMode]::Create)

try {
foreach ($path in $includePaths) {
$fullPath = Join-Path $root $path

if (Test-Path $fullPath -PathType Leaf) {
[System.IO.Compression.ZipFileExtensions]::CreateEntryFromFile(
$zip,
$fullPath,
($path -replace '\\', '/'),
[System.IO.Compression.CompressionLevel]::Optimal
) | Out-Null
continue
}

if (Test-Path $fullPath -PathType Container) {
Get-ChildItem -LiteralPath $fullPath -Recurse -File | ForEach-Object {
$entryName = $_.FullName.Substring($root.Length).TrimStart('\') -replace '\\', '/'
[System.IO.Compression.ZipFileExtensions]::CreateEntryFromFile(
$zip,
$_.FullName,
$entryName,
[System.IO.Compression.CompressionLevel]::Optimal
) | Out-Null
}
}
}
}
finally {
$zip.Dispose()
}

Write-Output "Created $output"
73 changes: 73 additions & 0 deletions build-xpi.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
$manifest = Get-Content "manifest.json" | ConvertFrom-Json
$name = ($manifest.name -replace '[^a-zA-Z0-9_-]+', '-').ToLower().Trim('-')
$version = $manifest.version
$output = "$name-v$version.xpi"

Add-Type -AssemblyName System.IO.Compression
Add-Type -AssemblyName System.IO.Compression.FileSystem

$root = (Get-Location).Path

$excludeNames = @(
".git",
".github",
".build-xpi",
"tests",
"create-zip.sh",
"create-zip-bash.sh",
"build-xpi.ps1"
)

$excludePatterns = @(
"*.zip",
"*.xpi",
"*.DS_Store",
"*.ndjson"
)

function Should-Skip($item) {
foreach ($name in $excludeNames) {
if ($item.Name -eq $name) {
return $true
}
}

foreach ($pattern in $excludePatterns) {
if ($item.Name -like $pattern) {
return $true
}
}

return $false
}

if (Test-Path $output) {
Remove-Item -LiteralPath $output -Force
}

$zip = [System.IO.Compression.ZipFile]::Open($output, [System.IO.Compression.ZipArchiveMode]::Create)

try {
Get-ChildItem -LiteralPath $root -Recurse -File | ForEach-Object {
$file = $_

$segments = $file.FullName.Substring($root.Length).TrimStart('\').Split('\')
foreach ($segment in $segments) {
if ($excludeNames -contains $segment) {
return
}
}

if (Should-Skip $file) {
return
}

$entryName = ($file.FullName.Substring($root.Length).TrimStart('\')) -replace '\\', '/'
[System.IO.Compression.ZipFileExtensions]::CreateEntryFromFile($zip, $file.FullName, $entryName, [System.IO.Compression.CompressionLevel]::Optimal) | Out-Null
}
}
finally {
$zip.Dispose()
}

Write-Output "Created $output"
2 changes: 0 additions & 2 deletions js/zs-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,6 @@ window.zeeschuimer = {
}
});
}));

return;
}
}
},
Expand Down
24 changes: 8 additions & 16 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{

"description": "Collect data while browsing social media platforms and upload it for analysis later",
"description": "Capture social media data while browsing and export it for later analysis",
"manifest_version": 2,
"name": "Zeeschuimer",
"version": "1.13.6",
"homepage_url": "https://github.com/digitalmethodsinitiative/zeeschuimer",
"name": "Pesquisa Social",
"version": "1.13.9",
"homepage_url": "mailto:danilo-f.marinho@hotmail.com",

"browser_specific_settings": {
"gecko": {
"update_url": "https://extensions.digitalmethods.net/updates.json",
"id": "pesquisa-social@local",
"data_collection_permissions": {
"required": ["none"]
}
Expand All @@ -22,7 +22,7 @@

"browser_action": {
"default_icon": "images/zeeschuimer-64.png",
"default_title": "Zeeschuimer Status"
"default_title": "Pesquisa Social"
},

"permissions": [
Expand All @@ -41,17 +41,9 @@
"modules/tiktok.js",
"modules/tiktok-comments.js",
"modules/instagram.js",
"modules/linkedin.js",
"modules/9gag.js",
"modules/imgur.js",
"modules/instagram-comments.js",
"modules/twitter.js",
"modules/douyin.js",
"modules/gab.js",
"modules/truth.js",
"modules/threads.js",
"modules/pinterest.js",
"modules/rednote.js",
"modules/rednote-comments.js"
"modules/twitter-comments.js"
]
}
}
Loading