Manage javascript execution policy per domain

Bug #1152891 reported by Stephan Haller
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Midori Web Browser
Fix Released
Undecided
Midori Devs

Bug Description

Hi everybody,

I created a new extension to manage the execution of javascript resource at each site. The repository for this extension at https://github.com/gmc-holle/midori-nojs

A patch file it attached to this bug but it also includes images in png.

Please let me know if you like it and if it works for you.

Greetings
Stephan

Related branches

Cris Dywan (kalikiana)
summary: - [new-extension] Manage javascript execution policy per domain
+ Manage javascript execution policy per domain
Revision history for this message
Cris Dywan (kalikiana) wrote :

Has anyone tested this new extension or followed its development? A basic test run, common sense and a "works for me" is all that's needed, then we can ship it.

We're nearing the next feature freeze on the weekend, so this is a good time to decide.

Revision history for this message
Cody Garver (codygarver) wrote :

The extension did not appear in the list for me. This is what I did to test it:

bzr branch lp:midori
cd midori
patch -p0 < nojs.diff
./waf configure --enable-granite
./waf build
_build/default/midori/midori

Changed in midori:
status: New → Incomplete
Cris Dywan (kalikiana)
Changed in midori:
status: Incomplete → Confirmed
Revision history for this message
Stephan Haller (nomad-p) wrote :

It should be true that just applying this patch wouldn't change anything to the build of midori. As the cookie security manager this extension was designed and build (by me) out of tree. I don't know the "waf" build system but you need to include the sources there and then rebuild midori. Sorry that I cannot help here.

This is my bash script called "compile.sh" to compile the sources. Only once after compilation you need to create a symlink to libnojs.so in /usr/lib{64,32}/midori/

----
#!/bin/sh

MIDORI_PATH="${HOME}/tmp/midori-0.4.8"
SOURCES="main.c nojs.c nojs-view.c nojs-preferences.c"
DEST="libnojs.so"
#PKGS="webkitgtk-3.0"
PKGS="webkit-1.0"

gcc -g -fPIC -Wall '-DMIDORI_VERSION_SUFFIX=" (0.4.8)"' "-DALTERNATE_DATADIR=\"$(pwd)\"" \
    -I"${MIDORI_PATH}"/ -I"${MIDORI_PATH}"/_build/default -I"${MIDORI_PATH}"/_build/default/midori -I. `pkg-config --cflags ${PKGS}` \
    -c \
    ${SOURCES} && \
  ld -shared --error-unresolved-symbols \
    `pkg-config --libs ${PKGS}` \
    ${SOURCES//\.c/.o} \
    -o ${DEST}

exit $?
----

Revision history for this message
Nebula Mechanica (falcon-peregrinus) wrote :

Tried to build it. It works, but icon is missing and you need to add names of files under extensions/nojs/ to POTFILES.in, so it will compile fine. Also there were some errors seen during the compilation, but again - it works. Taken version from here, so unsure if it is neweset - haven't check on github.

After fixing of such problems, I think that NoJS must be in upstream - Midori will be first minimalistic browser to support NoScript-like behavior.

Changed in midori:
assignee: nobody → Midori Devs (midori)
RabbitBot (rabbitbot-a)
Changed in midori:
status: Confirmed → Fix Committed
Cris Dywan (kalikiana)
Changed in midori:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.