Adapters do not need to know the site markup to work with it. Some of them may simply insert pop-ups, floating buttons, or something else onto the screen. We can call them viewport, universal or common adapters.
Task: change the Twitter Adapter to a Common Adapter and check it on Twitter, YouTube, Instagram and Dapplets.org.
The initial code for this example is in master.
twitter-config.dapplet-base.eth to a
common-config.dapplet-base.eth adapter in
/dapplet.json with a right version:
src/index.ts change injected adapter:
and set the right insertion point:
Here is the result code of the example: ex06-viewport-adapter.
Run the dapplet: