File tree Expand file tree Collapse file tree 9 files changed +28
-19
lines changed Expand file tree Collapse file tree 9 files changed +28
-19
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import {
1414 ScramjetFrame ,
1515} from "@mercuryworkshop/scramjet/bundled" ;
1616import { IsolatedFrame } from "./IsolatedFrame" ;
17+ import { defaultFaviconUrl } from "./assets/favicon" ;
1718
1819const requestInspectElement = createDelegate < [ HTMLElement , Tab ] > ( ) ;
1920
@@ -64,7 +65,7 @@ export class Tab extends StatefulClass {
6465 this . history = new History ( this ) ;
6566 this . history . push ( this . url , undefined ) ;
6667
67- this . icon = "/defaultfavicon.png" ;
68+ this . icon = defaultFaviconUrl ;
6869
6970 let resolver : ( ) => void ;
7071 this . waitForChobitsuInit = new Promise ( ( resolve ) => {
@@ -189,17 +190,18 @@ export class Tab extends StatefulClass {
189190 // placeholder title until the page fills in
190191 this . title = url . href ;
191192
192- if ( ! navigator . serviceWorker . controller ) {
193- serviceWorkerReady . then ( ( ) => {
194- this . frame . go ( url ) ;
195- } ) ;
196- } else {
197- this . frame . go ( url ) ;
198- }
193+ // if (!navigator.serviceWorker.controller) {
194+ // serviceWorkerReady.then(() => {
195+ this . frame . go ( url ) ;
196+ // });
197+ // } else {
198+ // this.frame.go(url);
199+ // }
199200 }
200201 }
201202
202203 pushNavigate ( url : URL ) {
204+ console . log ( "pushing" ) ;
203205 this . history . push ( url , undefined , true ) ;
204206 }
205207 replaceNavigate ( url : URL ) {
Original file line number Diff line number Diff line change 1+ import defaultFavicon from "../../public/defaultfavicon.png" ;
2+
3+ export const defaultFaviconUrl = defaultFavicon ;
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import iconFolder from "@ktibow/iconset-ion/folder-outline";
77import iconOpen from "@ktibow/iconset-ion/open-outline" ;
88import iconPause from "@ktibow/iconset-ion/pause-outline" ;
99import { formatBytes } from "../utils" ;
10+ import { defaultFaviconUrl } from "../assets/favicon" ;
1011
1112export const DownloadsPopup : Component < { } > = function ( cx ) {
1213 return (
@@ -27,7 +28,7 @@ export const DownloadsPopup: Component<{}> = function (cx) {
2728 { use ( browser . sessionDownloadHistory ) . mapEach ( ( b ) => (
2829 < div class = "entry" >
2930 < div class = "iconcontainer" >
30- < img src = "/defaultfavicon.png" > </ img >
31+ < img src = { defaultFaviconUrl } > </ img >
3132 </ div >
3233 < div class = "contents" >
3334 < span > { b . filename } </ span >
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import type { Tab } from "../Tab";
1313import { UrlInput } from "./UrlInput" ;
1414import { browser } from "../Browser" ;
1515import { Icon } from "./Icon" ;
16+ import { defaultFaviconUrl } from "../assets/favicon" ;
1617
1718import iconNew from "@ktibow/iconset-ion/duplicate-outline" ;
1819import iconTime from "@ktibow/iconset-ion/time-outline" ;
@@ -141,7 +142,7 @@ export const Omnibox: Component<{
141142 [
142143 ...states . map ( ( s ) => ( {
143144 label : s . title || "New Tab" ,
144- image : s . favicon || "/defaultfavicon.png" ,
145+ image : s . favicon || defaultFaviconUrl ,
145146 action : ( ) => {
146147 let rel =
147148 browser . activetab . history . states . indexOf ( s ) -
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import type { Tab } from "../Tab";
1111// import html2canvas from "html2canvas";
1212import { setContextMenu } from "./Menu" ;
1313import { browser , forceScreenshot , pushTab } from "../Browser" ;
14+ import { defaultFaviconUrl } from "../assets/favicon" ;
1415
1516const isFirefox =
1617 navigator . userAgent . includes ( "Gecko/" ) &&
@@ -137,7 +138,7 @@ export const DragTab: Component<
137138 < div class = { use ( this . active ) . map ( ( x ) => `main ${ x ? "active" : "" } ` ) } >
138139 < img
139140 src = { use ( this . tab . icon ) }
140- on :error = { ( ) => ( this . tab . icon = "/defaultfavicon.png" ) }
141+ on :error = { ( ) => ( this . tab . icon = defaultFaviconUrl ) }
141142 />
142143 < span > { use ( this . tab . title ) } </ span >
143144 < button
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import iconForwards from "@ktibow/iconset-ion/arrow-forward";
1313import { Icon } from "./Icon" ;
1414import { OmnibarButton } from "./OmnibarButton" ;
1515import { createMenuCustom , setContextMenu } from "./Menu" ;
16+ import { defaultFaviconUrl } from "../assets/favicon" ;
1617import { browser } from "../Browser" ;
1718import { SiteInformationPopup } from "./SiteInformationPopup" ;
1819import { emToPx , splitUrl } from "../utils" ;
@@ -183,7 +184,7 @@ export const UrlInput: Component<
183184 ) : (
184185 < img
185186 class = "favicon"
186- src = { item . favicon || "/defaultfavicon.png" }
187+ src = { item . favicon || defaultFaviconUrl }
187188 alt = "favicon"
188189 />
189190 ) }
@@ -207,7 +208,7 @@ export const UrlInput: Component<
207208 < img
208209 src = {
209210 this . overflowItems [ this . focusindex - 1 ] . favicon ||
210- "/defaultfavicon.png"
211+ defaultFaviconUrl
211212 }
212213 > </ img >
213214 ) : (
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import iconClose from "@ktibow/iconset-ion/close-outline";
66import iconFolder from "@ktibow/iconset-ion/folder-outline" ;
77import { Icon } from "../components/Icon" ;
88import { formatBytes } from "../utils" ;
9+ import { defaultFaviconUrl } from "../assets/favicon" ;
910
1011export const DownloadsPage : Component <
1112 {
@@ -21,7 +22,7 @@ export const DownloadsPage: Component<
2122 { use ( browser . globalDownloadHistory ) . mapEach ( ( e ) => (
2223 < div class = "entry" >
2324 < div class = "iconcontainer" >
24- < img src = "/defaultfavicon.png" > </ img >
25+ < img src = { defaultFaviconUrl } > </ img >
2526 </ div >
2627 < div class = "content" >
2728 < a href = { e . url } > { e . filename } </ a >
Original file line number Diff line number Diff line change 11import { css , type Component } from "dreamland/core" ;
22import type { Tab } from "../Tab" ;
33import { browser } from "../Browser" ;
4+ import { defaultFaviconUrl } from "../assets/favicon" ;
45
56export const HistoryPage : Component <
67 {
@@ -21,7 +22,7 @@ export const HistoryPage: Component<
2122 browser . newTab ( entry . url ) ;
2223 } }
2324 >
24- < img src = { entry . favicon || "/defaultfavicon.png" } alt = "favicon" />
25+ < img src = { entry . favicon || defaultFaviconUrl } alt = "favicon" />
2526 < span class = "title" > { entry . title || entry . url . href } </ span >
2627 < span class = "url" > { entry . url . hostname } </ span >
2728 </ div >
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import type { Tab } from "../Tab";
33import { browser } from "../Browser" ;
44import { trimUrl } from "../components/UrlInput" ;
55import { createMenu } from "../components/Menu" ;
6+ import { defaultFaviconUrl } from "../assets/favicon" ;
67
78export const NewTabPage : Component <
89 {
@@ -44,10 +45,7 @@ export const NewTabPage: Component<
4445 >
4546 < div class = "suggestioninner" >
4647 < div class = "circle" >
47- < img
48- src = { entry . favicon || "/defaultfavicon.png" }
49- alt = "favicon"
50- />
48+ < img src = { entry . favicon || defaultFaviconUrl } alt = "favicon" />
5149 </ div >
5250 < span class = "title" > { entry . title || trimUrl ( entry . url ) } </ span >
5351 </ div >
You can’t perform that action at this time.
0 commit comments