const LocalMessageDuplexStream = require('post-message-stream') const PongStream = require('ping-pong-stream/pong') const PortStream = require('./lib/port-stream.js') const ObjectMultiplex = require('./lib/obj-multiplex') const extension = require('./lib/extension') const fs = require('fs') const path = require('path') const inpageText = fs.readFileSync(path.join(__dirname + '/inpage.js')).toString() // Eventually this streaming injection could be replaced with: // https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.exportFunction // // But for now that is only Firefox // If we create a FireFox-only code path using that API, // MetaMask will be much faster loading and performant on Firefox. if (shouldInjectWeb3()) { setupInjection() setupStreams() } function setupInjection(){ try { // inject in-page script var scriptTag = document.createElement('script') scriptTag.src = extension.extension.getURL('scripts/inpage.js') scriptTag.textContent = inpageText scriptTag.onload = function () { this.parentNode.removeChild(this) } var container = document.head || document.documentElement // append as first child container.insertBefore(scriptTag, container.children[0]) } catch (e) { console.error('Metamask injection failed.', e) } } function setupStreams(){ // setup communication to page and plugin var pageStream = new LocalMessageDuplexStream({ name: 'contentscript', target: 'inpage', }) pageStream.on('error', console.error) var pluginPort = extension.runtime.connect({name: 'contentscript'}) var pluginStream = new PortStream(pluginPort) pluginStream.on('error', console.error) // forward communication plugin->inpage pageStream.pipe(pluginStream).pipe(pageStream) // setup local multistream channels var mx = ObjectMultiplex() mx.on('error', console.error) mx.pipe(pageStream).pipe(mx) // connect ping stream var pongStream = new PongStream({ objectMode: true }) pongStream.pipe(mx.createStream('pingpong')).pipe(pongStream) // ignore unused channels (handled by background) mx.ignoreStream('provider') mx.ignoreStream('publicConfig') mx.ignoreStream('reload') } function shouldInjectWeb3(){ return isAllowedSuffix(window.location.href) } function isAllowedSuffix(testCase) { var prohibitedTypes = ['xml', 'pdf'] var currentUrl = window.location.href var currentRegex for (let i = 0; i < prohibitedTypes.length; i++) { currentRegex = new RegExp(`\.${prohibitedTypes[i]}$`) if (currentRegex.test(currentUrl)) { return false } } return true } 2022Q1'>2022Q1 FreeBSD Ports (https://github.com/freebsd/freebsd-ports)
aboutsummaryrefslogtreecommitdiffstats
path: root/math/R
Commit message (Expand)AuthorAgeFilesLines
* math/R: Update to version 3.6.3jrm2020-03-022-23/+5
* Fix math/openblas and bump dependent portsswills2020-01-301-0/+1
* Add and use a shared INFO description. I have patches to add that knob tomarius2019-12-281-1/+0
* math/R: Update to version 3.6.2jrm2019-12-163-9/+9
* math/R: No-op to standardize formatting using ports-mgmt/portfmtjrm2019-12-161-64/+66
* devel/icu: update to 65.1jbeich2019-10-041-1/+1
* devel/openmp: update to 9.0.0jbeich2019-09-221-1/+1
* math/R: Fix dependency condition for devel/openmpjrm2019-09-201-11/+27
* Bump PORTREVISION for ports depending on the canonical version of GCCgerald2019-07-271-0/+1
* math/R: Update to version 3.6.1jrm2019-07-152-5/+4
* math/R: force new compiler on GCC architecturespkubaj2019-06-181-1/+2
* math/R: add powerpc64pkubaj2019-06-171-1/+1
* devel/openmp: phase outjbeich2019-05-091-0/+1
* cran.mk: Don't include math/R/compiler.mk; it was removed in r500605jrm2019-05-021-1/+0
* math/R: Upgrade to version 3.6.0jrm2019-05-024-92/+91
* Related to revision 499061 bump ports with USES=fortran to have themgerald2019-04-221-1/+1
* Update devel/readline to 8.0sunpoet2019-04-091-1/+1
* devel/icu: update to 64.1jbeich2019-03-281-0/+1
* math/R: Update to version 3.5.3jrm2019-03-142-5/+5
* math/R: Update to version 3.5.2jrm2018-12-233-5/+7
* Bump PORTREVISION for ports depending on the canonical version of GCCgerald2018-12-121-1/+1
* Install texinfo files (GNU info) into ${PREFIX}/share/infobapt2018-11-111-1/+1
* Remove compatibility code for FreeBSD < 11.2 from all ports.rene2018-11-021-1/+0
* devel/icu: update to 63.1jbeich2018-10-231-1/+1
* Bump PORTREVISION for ports depending on the canonical version of GCCgerald2018-07-301-0/+1
* math/R: Update to version 3.5.1jrm2018-07-083-13/+14
* devel/icu: update to 62.1jbeich2018-06-291-0/+1
* math/R: Permit building in poudriere with ATLASeadler2018-05-281-2/+0
* math/R: Update to version 3.5.0jrm2018-04-255-55/+54
* devel/icu: update to 61.1jbeich2018-04-061-0/+1
* math/R: Update to bug-fix release 3.4.4jrm2018-03-162-7/+6
* Bump PORTREVISIONs of all users of math/mpc that we just updated togerald2018-03-111-1/+1
* math/R: Turn on the TCLTK option by defaultjrm2018-02-281-2/+2
* math/R: Rename files/extra-patch-src_main_Makefile.in tojrm2017-12-012-0/+1
* math/R: Update to version 3.4.3jrm2017-12-013-26/+38
* Remove pkg-message about problems with gfortran. The problem has beentijl2017-11-181-18/+0
* - Allow users to change the default Fortran compiler via DEFAULT_VERSIONS.tijl2017-11-181-14/+7
* devel/icu: update to 60.1jbeich2017-11-091-1/+1
* math/R: Use the new flang argument to USES=fortran and patch libR.pc to link thejrm2017-10-271-10/+11
* math/R: Update to version 3.4.2jrm2017-09-303-25/+19
* devel/icu: update to 59.1jbeich2017-09-251-1/+1
* Bump PORTREVISION for ports depending on the canonical version of GCCgerald2017-09-111-1/+1
* math/R: Do not specify minimum tk versionjrm2017-09-051-5/+5
* Remove USES=objc:compiler, R doesn't use any objective c code and this breaksantoine2017-08-231-2/+2
* math/R: Work around bug 221127.jrm2017-08-032-1/+20
* math/R: Fix build issues when LIBR option is off and fix runtime issue byjrm2017-07-264-1/+5
* math/R: set SONAME for libraries under lib/R/libjrm2017-07-195-1/+88
* math/R: Fix typos in option descriptionsjrm2017-07-051-2/+2
* Setting OPTIONS_SINGLE_FORTRAN_armv6 was incorrect. It should bejrm2017-07-051-2/+2
* math/R: Update to version 3.4.1jrm2017-07-055-11/+59
* math/R: Build with gmake and add devel/gmake to RUN_DEPENDS because somejrm2017-06-291-4/+5
* Update devel/readline to 7.0 patch 3sunpoet2017-06-271-1/+1
* math/R: Update to version 3.4.0jrm2017-04-223-6/+37
* Bump PORTREVISIONs for ports depending on the canonical version of GCC andgerald2017-04-011-1/+1
* math/R: Update to version 3.3.3.jrm2017-03-103-7/+9
* - Remove always-true/false conditions after FreeBSD 9, 10.1, 10.2 EOLamdmi32017-01-111-7/+1
* Fix configure with zlib 1.2.10, configure script believes that versionantoine2017-01-071-0/+1
* Bump PORTREVISIONS for ports depending on the canonical version of GCC andgerald2016-12-071-1/+1
* Fix build issue when the LTO option is enabled, do not registerjrm2016-11-302-34/+11
* Bump PORTREVISIONS for ports depending on the canonical version of GCC andgerald2016-11-201-1/+1
* devel/icu: update to 58.1jbeich2016-11-201-1/+1
* math/R: More docuementation changes.jrm2016-11-052-54/+54
* math/R: Revert documentation changes and bump PORTREVISIONjrm2016-11-032-371/+364
* math/R: Fix typo and bump PORTREVISIONjrm2016-11-021-1/+2
* math/R: Update to version 3.3.2 and other changesjrm2016-11-023-397/+390
* Use USES=pathfix where applicable.mat2016-10-211-4/+1
* - Update devel/icu to 57.1.tijl2016-09-241-1/+1
* Update email address to jrm@FreeBSD.org for ports that I maintainjrm2016-09-241-1/+1
* math/R: maintainer reworkmarino2016-08-056-259/+59
* math/R: Tweak previous ${OSVERSION} without ${OPSYS} commitmarino2016-08-041-3/+3
* math/R: Fix usage of ${OSVERSION} without ${OPSYS}marino2016-08-031-0/+2
* Fix dependencies, Makefile cleanupsriggs2016-07-161-9/+7
* Prevent PKGNAME collision with math/libRantoine2016-07-101-1/+1
* Modernize and simplify portriggs2016-07-102-361/+193
* Bump PORTREVISION for the icu revert.mat2016-07-071-1/+1
* devel/icu: bump PORTREVISION on dependent portsgahr2016-07-061-0/+1
* Joseph Mingrone <jrm@ftfl.ca> has volunteered to maintain R in bf@'s absenceriggs2016-07-021-1/+1
* - Update to 3.3.1wen2016-07-013-17/+13
* Reset ports maintained by bf@ until he has time again to work on them.rene2016-06-281-1/+1
* math/R: add LIBR to OPTIONS_DEFAULT to allow math/rkward-kde4 to buildpi2016-06-261-2/+2
* math/R: Add optimization related options to Makefilepi2016-06-262-29/+40
* math/R: unbreak index.dbn2016-06-191-1/+1
* Mk/Uses/cran: add "compiles" argument.dbn2016-06-192-1/+3
* math/R: 3.2.2 -> 3.3.0pi2016-05-236-38/+44
* Remove ${PORTSDIR}/ from dependencies, categories m, n, o, and p.mat2016-04-01