Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

(Obsolete) Old Edge (EdgeHTML) build discussion thread #40

Closed
jspenguin2017 opened this issue Dec 15, 2017 · 158 comments
Closed

(Obsolete) Old Edge (EdgeHTML) build discussion thread #40

jspenguin2017 opened this issue Dec 15, 2017 · 158 comments
Labels
archived This thread was archived, open new issues for similar problems. META
Milestone

Comments

@jspenguin2017
Copy link
Member

jspenguin2017 commented Dec 15, 2017

For Chromium-based Edge: https://www.microsoft.com/en-us/microsoft-edge/insider-addons/detail/epbkapkgcmdmfpogenoebpdeibmfinpf

New thread: #253


Nano Adblocker is published: https://www.microsoft.com/store/productId/9NSXDX2TDB3V

Nano Defender is in review since May 2018...

Knows issues

Edge does not support listening to web_accessible_resources requests...

image
image

 

Edge restores (un-maximize) when browser.tabs.reload or browser.tabs.select is called.

Opening Logger in InPrivate mode breaks cosmetic filtering.

@reunicorn
Copy link

reunicorn commented Dec 15, 2017

You've probably already seen it, but in case you haven't, check out uBlock-Edge.
Although it hasn't been updated since July, nikrolls (the maintainer) did find some workarounds for Edge's incompatibility issues, which you might be able to integrate into Nano for Edge.

@jspenguin2017
Copy link
Member Author

jspenguin2017 commented Dec 15, 2017

I know that repo, and I plan on looking at it, I just added a 2 lines shim to see how well it performs.

Update: I quickly looked over his code and I don't really like how he did it. I probably will go read the doc and put together a shim from scratch, we'll see how it goes.

@kevin12314
Copy link

kevin12314 commented Dec 16, 2017

Hi, @jspenguin2017 . A few days ago I copied your project to my computer and tried to use nano adblocker on Edge. I used platform\chromium to modify.
This my way.
In manifest.json

  • default_icon,Change "128": ""img/browsericons/38_on.png"" to "38": "img/browsericons/128_on.png" .This change will make Icons show up.

  • icons add "16": "img/128_on.png", . This make context menu icon show up.

  • background add "persistent":true.

  • If you want publish to Windows Store, you need to add "minimum_edge_version": "41.16299.15.0",

In vapi-common.js and vapi-background.js

  • Change var chrome = self.chrome; to var chrome = self.browser;

In vapi-client.js

  • Change chrome.runtime.connect to browser.runtime.connect

In vapi-webrequest.js

  • Change wrApi = chrome.webRequest; to wrApi = browser.webRequest;

In vapi-background.js

  • comment out
 /*var iconPaths = [
 	    {
 	        '128': 'img/browsericons/128_off.png'
 	    },
 	    {
 	        '128': 'img/browsericons/38_on.png'
 	    }
	]; */
  • In var onTabReady = function(tab, status, badge) , add
var iconPaths = status === 'on' ?
	   { '38': 'img/browsericons/38_on.png' } :
	   { '38': 'img/browsericons/38_off.png' };
  • Change
 browserAction.setIcon({
                tabId: tab.id,
                path: iconPaths[status === 'on' ? 1 : 0]
            });

to

 browserAction.setIcon({
	    tabId: tab.id,
	    path: iconPaths
	});

Edge will get exception Property 'path': 'tabId' is not a valid property in the dictionary if use path: iconPaths[status === 'on' ? 1 : 0]

In tools folder add make-edge.sh . You can copy from make-chromium.sh. But you need to add this line sed -i "s/'fullwide',\s*//g" $DES/js/*.js after rm $DES/js/vapi-usercss.js. Because time.toLocaleString('fullwide', timeOptions); Edge will get exception with 'fullwide' parameter. this code is to remove 'fullwide' parameter.

This my screen shot.
image

image

image

dashboard page
image

background page not get exception.
image

[Update by jspenguin2017: Folding this post as it is long and already resolved]

@jspenguin2017
Copy link
Member Author

jspenguin2017 commented Dec 16, 2017

Amazing! Can you post your changes? Like a patch file or a repo commits?

@kevin12314
Copy link

nano adblocker edge.zip

The file list different from platform\chromium are

  • manifest.json

  • vapi-common.js

  • vapi-background.js

  • vapi-client.js

  • vapi-webrequest.js

  • cloud-ui.js

cloud-ui.js need change becouse Edge syncs data in the background, so this callback is very fast. It's
often faster than initialisation, meaning there's a race condition where the UI is not always ready for the assumptions this function makes. This change is what I found from uBlock-Edge.

@jspenguin2017
Copy link
Member Author

OK, cool, as Microsoft Store is still full according to Microsoft, we might have to wait a while, I'll start with new Dashboard.

@reunicorn
Copy link

reunicorn commented Dec 18, 2017

Microsoft is slowly but surely adding more extensions to their store. It couldn't hurt to submit Nano AdBlocker and/or Nano Defender for review just to get in the queue.
They've added 10 more extensions and are now up to 80 total, which at least shows that they're moving forward with it.
I understand if you wanted to add more polish/features/etc. first.

@jspenguin2017
Copy link
Member Author

If I submit it now, can I update it when it's in the review queue?

@jspenguin2017
Copy link
Member Author

@kevin12314 Can you copy-paste your custom filters? Something doesn't feel right about the syntax highlighter.

@kevin12314
Copy link

kevin12314 commented Dec 19, 2017

@@/showads.js$domain=shink.in
avlang2.info##div.tac
ck101.com##div.fuckBlockCover>div.playerCover
cool18.com##div.body_center[style='width:1000px;height:270px;']
@@||fas.li^$generichide
!@@||btrll.com^$third-party 
@@|http://$subdocument,domain=iqiyi.com

!UDN購物
@@shopping.udn.com/mall/images/spacer.gif?

!ASUS
@@||googletagmanager.com/gtm.js?$third-party,domain=asus.com

! Windows Central Youtube Block Workaround
@@|blob:$domain=windowscentral.com 

! ‎2017‎年‎2‎月‎9‎日‎ ‎下午‎ ‎11‎:‎39‎:‎12 http://www.hclips.com/videos/18-year-old-japanese-teen-recorded-fucking-her-boyfriend/?promo=1102
www.hclips.com##.pl_1

! ‎2017‎年‎3‎月‎29‎日‎ ‎下午‎ ‎10‎:‎07‎:‎55 https://gnn.gamer.com.tw/0/145260.html
gamer.com.tw###BH-bigbanner

! ‎2017‎年‎4‎月‎18‎日‎ ‎下午‎ ‎11‎:‎44‎:‎51 https://9song.me/2017/04/17/%e7%be%8e%e9%ba%97%e6%9c%aa%e4%ba%a1%e4%ba%ba/
9song.me##a[href^="http://gdot.h978.com/index.phtml"]

! ‎2017‎年‎4‎月‎18‎日‎ ‎下午‎ ‎11‎:‎45‎:‎27 https://9song.me/2017/04/17/%e7%be%8e%e9%ba%97%e6%9c%aa%e4%ba%a1%e4%ba%ba/
9song.me##.entry-inner > .post

! ‎2017‎年‎5‎月‎21‎日‎ ‎下午‎ ‎10‎:‎05‎:‎15 https://www.google.com.tw/search?q=%E5%B7%B4%E5%93%88%E5%A7%86%E7%89%B9&ie=&oe=
google.*##.pdp-psy

! ‎2017‎年‎5‎月‎21‎日‎ ‎下午‎ ‎10‎:‎36‎:‎44 https://www.google.com.tw/maps/@25.005939,121.4565846,13z
www.google.com.tw###pushdown

! ‎2017‎年‎5‎月‎21‎日‎ ‎下午‎ ‎10‎:‎41‎:‎01 https://docs.google.com/document/u/0/
docs.google.com##.gb_g.gb_Mc.gb_Kc.gb_Lc

@jspenguin2017
Copy link
Member Author

jspenguin2017 commented Dec 19, 2017

@kevin12314
Copy link

Those filters were generated through uBlock Origin Block element. If I key in filter like
! 2017年5月20日 下午10:41:01 https://docs.google.com/document/u/0/
It seems that it did not add Unicode 8206.

@jspenguin2017
Copy link
Member Author

jspenguin2017 commented Dec 19, 2017

Yea, the guy who did the translation had some weird stuff going on with his IDE. Actually, it's a quirk in Edge.

@reunicorn
Copy link

reunicorn commented Dec 19, 2017

If I submit it now, can I update it when it's in the review queue?

Yes, you can submit as many times as you like and your most recent submission will be the one considered.

@jspenguin2017 jspenguin2017 changed the title Nano Adblocker for Edge issues mega thread Nano Adblocker / Defender for Edge issues mega thread Dec 23, 2017
@jspenguin2017 jspenguin2017 added this to the v1.0.1 milestone Jan 1, 2018
@kevin12314
Copy link

@jspenguin2017 I update build scripts use Node.js and remove same files in platform\edge files as in platform\chromium. All update is base on v1.0.0.24 Source code.

File:
NanoCore.zip
Edge extension:
Nano_Edge.zip

@jspenguin2017
Copy link
Member Author

You are on the beta version of Windows? The latest stable version of Edge is 40.15063.674.0.

@jspenguin2017
Copy link
Member Author

I don't see what your patch to cloud-ui.js achieve, it waits for the button? Why?

@jspenguin2017
Copy link
Member Author

browserAction.setIcon in Edge mutates objects that are passed in, WTF?

@jspenguin2017
Copy link
Member Author

jspenguin2017 commented Jan 5, 2018

It's more complex than I expected, hum... Still crashing...

@jspenguin2017
Copy link
Member Author

Please refrain from bring discussion off topic, manifest v3 is addressed here: #238

@jspenguin2017
Copy link
Member Author

I just submitted an update, it should be available for download soon.

@TitusTroy
Copy link

      I just submitted an update, it should be available for download soon.

nice!...Nano Adblocker on Edge now shows as version 0.0.85.0...the latest Google Chrome version shows as 0.0.86 released on January 25th 2019

@jspenguin2017
Copy link
Member Author

The Chrome version includes a Chrome-only hotfix. The bug does not affect Edge.

@seba2282
Copy link

I have a problem with dobreprogramy.pl in Microsoft Edge.
I use all filters without options "turn off cosmetic filters" + mine filters on that screen
filters

And on dobreprogramy.pl is ad about Avast
bug

And Nano doesn't block that.
Some suggest @jspenguin2017 ?

@jspenguin2017
Copy link
Member Author

jspenguin2017 commented Jan 30, 2019

@seba2282 That seems to be self-promotion. You can report it to the maintainers of the Polish regional filters if you want.

@seba2282
Copy link

But is small problem. Nano Adblocker blocker has updated rules in polish filters and it works with Chrome. Ublock Origin has too and it works with Chrome and others browser. But any doesn't work with Edge. Team Polish gave cosmetic rules for hidden and clean that (normal don't need this rules) for MS Edge and Nano Adblocker / Ublock Origin doesn't block that.

@jspenguin2017
Copy link
Member Author

jspenguin2017 commented Jan 30, 2019

@seba2282
What's the rule?
I see that on Chrome even with Polish regional filters enabled.

@seba2282
Copy link

I tried all, what is in that topic and @krystian3w helped:
MajkiIT/polish-ads-filter#11646

@krystian3w
Copy link

krystian3w commented Jan 30, 2019

adblock_ublock.txt

!#if !cap_user_stylesheet
www.dobreprogramy.pl###phContent_avastBadge:style(visibility: hidden !important;)
www.dobreprogramy.pl##script:inject(nano-remove-elements-onready.js, #phContent_avastBadge)
!#endif

!#if env_edge
||static.dpcdn.pl/*/assets/img/_global/avast_logo.svg$image,important
||static.dpcdn.pl/*/assets/img/_global/avast_shield.svg$image,important
www.dobreprogramy.pl###phContent_avastBadge > span
www.dobreprogramy.pl###phContent_avastBadge > span > i
!#endif

adblock_AdGuard.txt

!+ PLATFORM(windows, ext_edge)
www.dobreprogramy.pl#?##phContent_avastBadge

!+ PLATFORM(windows)
www.dobreprogramy.pl$$#phContent_avastBadge

but normal should works:

###phContent_avastBadge MajkiIT/polish-ads-filter 153b79f adblock.txt#L215

or

www.dobreprogramy.pl###phContent_hpOperaLink, #phContent_avastBadge MajkiIT/polish-ads-filter 153b79f adblock.txt#L4253


AdGuard filter www.dobreprogramy.pl#?##phContent_avastBadge should add inline "style="display: none !important;"" on element.

@krystian3w
Copy link

krystian3w commented Jan 30, 2019

I see that on Chrome even with Polish regional filters enabled.

OK, on Chromium e.g. Opera 58 works:

www.dobreprogramy.pl###phContent_avastBadge:style(visibility: hidden;)

or

www.dobreprogramy.pl###phContent_avastBadge:style(visibility: hidden !important;)

@seba2282 try in Edge use first filter, we did not check it (maybe forcing the !important bug that the filter does not work at all).

@seba2282
Copy link

seba2282 commented Jan 30, 2019

www.dobreprogramy.pl###phContent_avastBadge:style(visibility: hidden;) doesn't work.
www.dobreprogramy.pl###phContent_avastBadge:style(visibility: hidden !important;) work on moment and after few refresh site is again problem back.
In Microsoft Edge

@jspenguin2017
Copy link
Member Author

Ah, it's user stylesheet again... This works for now:

dobreprogramy.pl##+js(nano-remove-elements-onready.js, #phContent_avastBadge)

@seba2282
Copy link

Not to end. I added your rule now and when I go on site download some program on dobreprogramy.pl, ads Avast hided. But after refresh that site, again showed that frustrated ads Avast. If I know good, that problem is only on Microsoft Edge. You know what is reason "why" ?

@kevin12314
Copy link

      Not to end. I added your rule now and when I go on site download some program on dobreprogramy.pl, ads Avast hided. But after refresh that site, again showed that frustrated ads Avast. If I know good, that problem is only on Microsoft Edge. You know what is reason "why" ?

What is your version of Windows? Is 1809 build 17763? If so, it is an edge bug that has now been fixed in 19H1 Insider preview.

I'm trying to use this

dobreprogramy.pl##+js(nano-remove-elements-onready.js, #phContent_avastBadge)

in the new 19H1 build 18323, and refresh that site, ads Avast is not shown.

@krystian3w
Copy link

@kevin12314 css also works?

www.dobreprogramy.pl###phContent_avastBadge:style(visibility: hidden !important;)
www.dobreprogramy.pl###phContent_avastBadge:style(visibility: hidden;)

@seba2282
Copy link

I still have Windows 10 1809.

@krystian3w
Copy link

Because it is now ending January, we will wait for a nasty 19H1.

@kevin12314
Copy link

www.dobreprogramy.pl###phContent_avastBadge:style(visibility: hidden !important;)
www.dobreprogramy.pl###phContent_avastBadge:style(visibility: hidden;)

The two were hidden at first, but then re-displayed after about 15 seconds.

@jspenguin2017
Copy link
Member Author

jspenguin2017 commented Mar 17, 2019

The extensions store for Chromium-based Edge is up now: https://www.microsoft.com/en-us/microsoft-edge/insider-addons/detail/epbkapkgcmdmfpogenoebpdeibmfinpf

I was thinking about making one last build for the old Edge, but unfortunately the latest upstream requires TextDecoder, which the old Edge does not have. It shouldn't be too hard to find a polyfill but considering the new Edge is probably only a few weeks away, I don't think it's worth the time.

@jspenguin2017 jspenguin2017 unpinned this issue Mar 17, 2019
@jspenguin2017 jspenguin2017 changed the title Nano Adblocker / Defender for Edge issues mega thread (Obsolete) Old Edge (EdgeHTML) build discussion thread Mar 17, 2019
@jspenguin2017
Copy link
Member Author

New thread: #253

@github-actions github-actions bot added the archived This thread was archived, open new issues for similar problems. label Aug 21, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Aug 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived This thread was archived, open new issues for similar problems. META
Projects
None yet
Development

No branches or pull requests