1. Nachrichten
  2. Forum
    1. Unerledigte Themen
    2. Forenregeln
  3. Spenden
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. camp-firefox.de
  2. Mira_Belle

Beiträge von Mira_Belle

  • Sidebar CSS wird nicht umgesetzt

    • Mira_Belle
    • 16. September 2026 um 15:53

    2002Andreas Ich bin ein wenig dusselig!
    Vor dem Wort "Lesezeichen-Menü" der kleine Pfeil und schwubs, schon sind die Lesezeichen da!


    Boersenfeger Du meinst den blauen Rand?
    Da bin ich gerade drann!
    Ich vermute, Dir haut da irgendetwas anderes dazwischen!
    Denn egal was ich auch anstelle, bei mir ist die Sidebar links bündig mit dem Fensterrand!

    Hast Du Deine CSS alle per @import in der userChrome.css eingebunden?
    Wenn ja, alle, außer die für die Sidebar, mal auskommentieren!

    Du schreibst, Du hättest zwei Werte geändert!
    Im urprünglichen CSS sah das noch ganz anders aus:!:

    CSS
        #sidebar-box {
            display: flex !important;
            position: absolute !important;
            top: 0;
          /*  bottom: 5px;  */
            bottom: -5px !important; /* REPARIERT: Schließt jetzt unten perfekt ab */
            width: 260px !important;
            z-index: 100 !important;
            opacity: 0 !important;
            margin-left: -255px !important;
            transition: margin-left .5s linear .4s, opacity .6s ease-in .2s !important;
        }
    Alles anzeigen



    Und bastle mal diesen Schnipsel in CSS (von mir) ein.

    CSS
    #sidebar-box {
      padding-left: 0 !important;
    }
  • Sidebar CSS wird nicht umgesetzt

    • Mira_Belle
    • 16. September 2026 um 15:29
    Zitat von 2002Andreas

    Links ist ein schmaler schwarzer Rand bei dir.

    Oh, das ist der Fensterrahmen!!
    Mein Windows 10 hat Fensterrahmen, es sieht aus ähnlich Windows 7.

    Beispiel


    Zitat von Sören Hentzschel

    Das sieht nach dem Fensterrand des Windows-Themes aus, durch den der Hintergrund durchscheint.

    :thumbup:

    War 'ne ganz schöne Arbeit, das so hinzubekommen!
    Theme selber gemoddet!


    Zitat von 2002Andreas

    So soll das aussehen:

    Tut es bei mir ja auch!
    Also fast! Es werden halt keine Lesezeichen angezeigt!
    Warum auch immer, aber das ist ja erst einmal egal.

  • Sidebar CSS wird nicht umgesetzt

    • Mira_Belle
    • 16. September 2026 um 15:25

    2002Andreas
    Auf die Schnelle das mal in einer extra eingerichtete portablen Nightly getestet!
    Auch da habe ich links der Sidebar keinen solchen Rand!


    Was mache ich falsch?

  • Sidebar CSS wird nicht umgesetzt

    • Mira_Belle
    • 16. September 2026 um 14:44

    2002Andreas Habe die Lesezeichensymbolleiste eingeblendet!
    Nutze einen cleanen Firefox, Version 156.
    Nur das eine CSS über die userChrome.css per @import url("./css/Sidebar.css"); eingebunden.

    Kann das mit dem Rand, links der Seitenleiste nicht nachstellen!

  • Sidebar CSS wird nicht umgesetzt

    • Mira_Belle
    • 16. September 2026 um 10:32

    Ah, schau ich mir heut Mittag oder Abend mal an.
    Jetzt ab in die Gastro, die Leut haben Hunger.

  • Sidebar CSS wird nicht umgesetzt

    • Mira_Belle
    • 16. September 2026 um 10:04

    Habe noch mal etwas herumgebastelt!

    Die Lesezeichenseitenleiste geht nun von oben bis ganz nach unten!
    Es bleibt also unten kein Spalt mehr!
    Siehe Kommentar unter #sidebar-box
    Dann habe ich mal die "eigentliche" Seitenleiste inkl. rechten Rand, der dann ja wirklich unschön aussah, entfernt.
    Diese "Regeln" stehen ganz oben im CSS und sind kommentiert, damit sie leichter zu finden sind und bei nicht gefallen
    einfach auskommentiert oder entfernt werden können.

    CSS
    @-moz-document url("chrome://browser/content/sidebar/sidebar-bookmarks.html"),
                   url("chrome://browser/content/browser.xhtml") {
    
        /* "Einstellungs" Sidebar ausblenden */           
        .buttons-wrapper {
            display: none !important;
        }
    
        /* Rechter Rand ausblenden */
        #sidebar-splitter {
            display: none !important;
        }
    
        /* Suchsymbol in der Sidebar ausblenden */
        #input[type="search"] {
            padding-inline-start: var(--space-medium) !important;
            background-image: none !important;
        }
    
        /* Ordner aus der Sidebar ausblenden */
        [data-guid="unfiled_____"],
        [data-guid="toolbar_____"] {
            display: none !important;
        }	
    
        sidebar-bookmark-row {
            height: 20px !important;
        }
    
        ::placeholder  {
            color: transparent !important;
        }
    
        .sidebar-panel-heading {
            display: none !important;
        }
    
        details summary, 
        .bookmark-folder-label {
            font-size: 16px !important;
            font-family: Comic Sans MS, sans-serif !important;
        }
    
        .fxview-tab-row-main, .fxview-tab-row-title {
            font-size: 16px !important;
            font-family: Comic Sans MS, sans-serif !important;
            margin-top: -13px !important;
            margin-bottom: -13px !important;
            padding-top: 0px !important;
            padding-bottom: 0px !important;
        }
    
        #input {
            &[type="search"] {
                &.with-icon {
                    font-size: 16px !important;
                    font-family: Comic Sans MS, sans-serif !important;
                }
            }
        }
    
        .sidebar-panel {
            background: #c1e7bb !important;
        }
    
        details {
            margin-top: -3px !important;
            margin-left: -8px !important;
        }
    
        details summary {
            &::before {
                content: "" !important;
                display: none !important;
            }
        }
    
        details summary, .bookmark-folder-label {
            &::before {
                background-image: url("..//icons/Ordner.png")!important;
            }
    	}
    
        details > summary { 
            background-image: url("..//icons/Ordner.png")!important;	 
        }
    				   
        #sidebar-main > sidebar-main {
            display: none !important;
        }
    
        #sidebar-box {
            display: flex !important;
            position: absolute !important;
            top: 0;
          /*  bottom: 5px;  */
            bottom: -5px !important; /* REPARIERT: Schließt jetzt unten perfekt ab */
            width: 260px !important;
            z-index: 100 !important;
            opacity: 0 !important;
            margin-left: -255px !important;
            transition: margin-left .5s linear .4s, opacity .6s ease-in .2s !important;
        }
    
        #sidebar-box:hover {
            z-index: 100 !important;
            opacity: 1 !important;
            margin-left: 0 !important;
            transition: margin-left .66s !important;
        }
    
        /* Sidebar Hintergrundfarbe */
        #sidebar {
            background: #c1e7bb !important;
            opacity: 1 !important;
        }
    
    }
    Alles anzeigen

    Viel Spaß damit.

  • Sidebar CSS wird nicht umgesetzt

    • Mira_Belle
    • 16. September 2026 um 09:23

    grisu2099 Stimmt, aus das habe ich gar nicht geachtet!
    Habe das CSS von Boersenfeger einfach 1:1 übernommen und nur die fehlenden Klammern eingesetzt.
    Habe es jetzt mal schnell korrigiert, ist ja fast peinlich. :saint:

  • Sidebar CSS wird nicht umgesetzt

    • Mira_Belle
    • 15. September 2026 um 23:02

    2002Andreas Stimmt. Ich hatte mir aber nur den Codeschnipsel angeschaut!

    Ich war aber mal so frei, und habe das CSS korrigiert und mal sauber formatiert.

    CSS
    @-moz-document url("chrome://browser/content/sidebar/sidebar-bookmarks.html"),
                   url("chrome://browser/content/browser.xhtml") {
    	
        /* Suchsymbol in der Sidebar ausblenden */
        #input[type="search"] {
            padding-inline-start: var(--space-medium) !important;
            background-image: none !important;
        }
    
        /* Ordner aus der Sidebar ausblenden */
        [data-guid="unfiled_____"],
        [data-guid="toolbar_____"] {
            display: none !important;
        }	
    
        sidebar-bookmark-row {
            height: 20px !important;
        }
    
        ::placeholder  {
            color: transparent !important;
        }
    
        .sidebar-panel-heading {
            display: none !important;
        }
    
        details summary, 
        .bookmark-folder-label {
            font-size: 16px !important;
            font-family: Comic Sans MS, sans-serif !important;
        }
    
        .fxview-tab-row-main, .fxview-tab-row-title {
            font-size: 16px !important;
            font-family: Comic Sans MS, sans-serif !important;
            margin-top: -13px !important;
            margin-bottom: -13px !important;
            padding-top: 0px !important;
            padding-bottom: 0px !important;
        }
    
        #input {
            &[type="search"] {
                &.with-icon {
                    font-size: 16px !important;
                    font-family: Comic Sans MS, sans-serif !important;
                }
            }
        }
    
        .sidebar-panel {
            background: #c1e7bb !important;
        }
    
        details {
            margin-top: -3px !important;
            margin-left: -8px !important;
        }
    
        details summary {
            &::before {
                content: "" !important;
                display: none !important;
            }
        }
    
        details summary, .bookmark-folder-label {
            &::before {
                background-image: url("..//icons/Ordner.png")!important;
            }
    	}
    
        details > summary { 
            background-image: url("..//icons/Ordner.png")!important;	 
        }
    				   
        #sidebar-main > sidebar-main {
            display: none !important;
        }
    
        #sidebar-box {
            display: flex !important;
            position: absolute !important;
            top: 0;
            bottom: 5px;
            width: 260px !important;
            z-index: 100 !important;
            opacity: 0 !important;
            margin-left: -255px !important;
            transition: margin-left .5s linear .4s, opacity .6s ease-in .2s !important;
        }
    
        #sidebar-box:hover {
            z-index: 100 !important;
            opacity: 1 !important;
            margin-left: 0 !important;
            transition: margin-left .66s !important;
        }
    
        /* Sidebar Hintergrundfarbe */
        #sidebar {
            background: #c1e7bb !important;
            opacity: 1 !important;
        }
     }
    Alles anzeigen

    Jetzt aber! Jetzt sollte es fein sein.

  • Sidebar CSS wird nicht umgesetzt

    • Mira_Belle
    • 15. September 2026 um 19:25
    Zitat von .DeJaVu

    Ich weiss zwar nicht warum, aber Helfer waren immer im Nachteil.

    Boesenfeger und ich sind mal aneinander geraten, Schwamm drüber.
    Aber er scheint mich zu ignorieren. OK, sein Problem, wenn das CSS wieder versagt!
    Es ist ja kaputt, dennoch bügelt Firefox das noch aus.
    Und was sein anderes Problem aus #41 betrifft,
    damit beschäftige ich mich nicht, es sei denn er meldet sich noch einmal.

  • Sidebar CSS wird nicht umgesetzt

    • Mira_Belle
    • 15. September 2026 um 18:22

    Boersenfeger Du läufst Gefahr, dass Dein CSS wieder irgendwann nicht funktioniert!!

    CSS
    details summary, .bookmark-folder-label {
        &::before 
    	background-image: url("..//icons/Ordner.png")!important;
      }
    	
    details > summary { 
    	background-image: url("..//icons/Ordner.png")!important;	 
    	}

    Ist FALSCH:!:
    Es ist da ein Syntaxfehler enthalten!
    Außerdem fehlt eine Klammer!

    Also, so wäre der Code richtig.

    CSS
    details summary, .bookmark-folder-label {
        &::before {
            background-image: url("../icons/Ordner.png") !important;
        }
    }
    	
    details > summary { 
        background-image: url("../icons/Ordner.png") !important;	 
    }

    Und damit ist auch klar, dass Dein CSS nicht direkt in chrome liegt!

  • Sidebar CSS wird nicht umgesetzt

    • Mira_Belle
    • 15. September 2026 um 17:03

    Oder anders!
    Wenn das CSS direkt in c:\Users\Ich\AppData\Roaming\Mozilla\Firefox\Profiles\12345678.default-nightly\chrome
    liegt, ein Punkt weniger!

    Also background-image: url("./icons/Ordner.png")
    Meine, dass das so richtig ist.

    Du kannst es aber auch ohne ./ schreiben, ist exakt dasselbe!

    background-image: url("icons/Ordner.png")


    Bei meinen Beispielen gehe ich davon aus, dass das CSS direkt in chrome liegt:!:

    CSS
    details summary, .bookmark-folder-label {
        &::before 
    	background-image: url("icons/Ordner.png");
      }
    	
    details > summary { 
    	background-image: url("icons/Ordner.png");	 
    	}

    bzw.

    CSS
    details summary, .bookmark-folder-label {
        &::before 
    	background-image: url("./icons/Ordner.png");
      }
    	
    details > summary { 
    	background-image: url("./icons/Ordner.png");	 
    	}
  • Sidebar CSS wird nicht umgesetzt

    • Mira_Belle
    • 15. September 2026 um 16:59

    Und der Pfad zum CSS?

    Was passiert, wenn Du den kompletten Pfad vorgibst?

  • Sidebar CSS wird nicht umgesetzt

    • Mira_Belle
    • 15. September 2026 um 16:12
    Zitat von Boersenfeger

    Das hat es gebracht... vielen lieben Dank an alle Beteiligten!

    Super, dass mit vereintem Wissen und "Forschung" Dein Problem nun behoben ist!

    Zitat von Boersenfeger

    Jetzt muss ich nur noch mein altes Ordner Icon wiederfinden ...

    Viel Erfolg! :)

  • Sidebar CSS wird nicht umgesetzt

    • Mira_Belle
    • 15. September 2026 um 09:51
    Zitat von Sören Hentzschel

    ... dem Fall irgendwann in den nächsten Monaten eine Anpassung des Codes notwendig sein wird. ...

    D.h. das würde so dann ja jetzt schon in der Nightly nicht mehr funktionieren, richtig?

  • Sidebar CSS wird nicht umgesetzt

    • Mira_Belle
    • 14. September 2026 um 19:16
    Zitat von Boersenfeger

    Wie muss mans dann machen?

    War die Frage an mich gerichtet?
    Und von "müssen" ist eventuell etwas übertrieben, finde ich.
    Natürlich werdet Ihr das auch mit CSS hinbekommen, da bin ich mir Absolut sicher!
    Ich habe ein JS, da muss schon ziemlich lange nicht mehr daran was geändert werden.
    Für Dich müsste ich es dann aber doch etwas ändern, da Du ja ein anderes Design haben möchtest.
    Denke, das bekäme ich hin.
    Es funktioniert auch in der aktuellen Nightly!
    Wenn Du magst, stelle ich es mal zum Ausprobieren hier rein.
    Und wenn Du gefallen daran findest, bauen wir (ich) es Deinen Wünschen entsprechend um.

  • Sidebar CSS wird nicht umgesetzt

    • Mira_Belle
    • 14. September 2026 um 18:19

    Muss das unbedingt per CSS umgesetzt werden?

  • Nackter Firefox nach Update

    • Mira_Belle
    • 14. September 2026 um 18:08
    Zitat von BrokenHeart

    Beim Firefox verändert sich bis auf ein paar Lesezeichen doch recht selten etwas, was man ständig sichern müsste...

    Naja, kommt darauf an.
    Wenn bei einem Update die oder irgendein JS nicht mehr so will wie es soll.
    Oder wenn CSS-Selektoren im Programm geändert werden.
    Also ich mache bei jeder Änderung an den Scripten ein "kleines" Backup.
    Bei jedem Versionssprung ein "großes"!
    D.h. einmal nur die Profile, oder eben inkl. Installation!
    Dazu nutze ich ein PowerShell-Script, das ich heute auch um eine Funktion erweitert habe!
    Die "profiles.ini" kann jetzt auch gesichert werden.

    Wer es sich anschauen möchte, bitte.

    Beitrag

    RE: Wer mag testen? Firefox4backup

    Hier eine erweiterte Version der PowerShell-Scripts.
    Es kann auch die "profiles.ini" zur Sicherung ausgewählt werden.

    Es muss aber 7-Zip installiert sein:!:

    (Quelltext, 375 Zeilen)

    Wer so ein bisschen mit PowerShell kann, kann ja das ganze auf die interne Packfunktion umschreiben!
    Oben ist die ja schon, noch ohne "profiles.ini" sichern.
    Mira_Belle
    14. September 2026 um 18:07



    Und ein JavaScript, welches nur den Profilordner sichert, gibt es ja auch!

    Beitrag

    RE: BackupProfile.uc.js - div. Fragen dazu

    Bisher hatte ich ja das originale Script von #1 mit leichten Abwandlungen und Korrekturen genutzt!
    Mir persönlich gefällt, gefiel mir der Aufbau dieses Scripts nicht.
    Daher habe ich mir ein "Neues" gebaut!
    Grundsätzlich funktioniert es genau so, wie das Original,
    nur ist jetzt klarer ersichtlich, wo der Nutzer Hand anlegen kann!
    Aber was "labere ich, schaut selbst.

    (Quelltext, 156 Zeilen)

    Mira_Belle
    3. September 2026 um 17:35
  • Wer mag testen? Firefox4backup

    • Mira_Belle
    • 14. September 2026 um 18:07

    Hier eine erweiterte Version der PowerShell-Scripts.
    Es kann auch die "profiles.ini" zur Sicherung ausgewählt werden.

    Es muss aber 7-Zip installiert sein:!:

    Code
    Add-Type -A System.Windows.Forms
    
    #region Grundeinstellungen
    $7z = "$env:ProgramFiles\7-zip\7zG.exe"
    $Reg = "HKCU:\Software\FF_Backup"
    $Fonts = @(
        [Drawing.Font]::New("Microsoft Sans Serif", 12)
        [Drawing.Font]::New("Microsoft Sans Serif", 12, [Drawing.FontStyle]::Bold)
    )
    [Windows.Forms.Application]::EnableVisualStyles()
    #endregion
    
    # Funktion zur Anzeige des Hinweisfensters
    function Show-FirefoxRunningDialog {
        $Form = [Windows.Forms.Form]@{
            Text = "Hinweis"
            AutoSize = $false
            StartPosition = 'CenterScreen'
            Size = "565,155"
            Padding = '10,10,10,10'
            KeyPreview = $true
        }
        $Table = [Windows.Forms.TableLayoutPanel]@{
            Dock = 'Fill'
            AutoSize = $true
        }
        $Flow = [Windows.Forms.FlowLayoutPanel]@{
            Anchor = 'Top'
            AutoSize = $true
            AutoSizeMode = 'GrowAndShrink'
        }
    
        $Label = [Windows.Forms.Label]@{
            Font = $Fonts[0]
            Margin = '10,10,10,10'
            AutoSize = $true
            Text = "Firefox wird noch ausgeführt. Soll Firefox beendet werden?"
        }
    
        $OKButton = [Windows.Forms.Button]@{
            Size = "120,40"
            Text = "OK"
            Font = $Fonts[1]
            Margin = '10,10,10,10'
        }
        $OKButton.Add_Click({
            $Form.DialogResult = [System.Windows.Forms.DialogResult]::OK
            $Form.Close()
        })
    
        $CancelButton = [Windows.Forms.Button]@{
            Size = "120,40"
            Text = "Abbrechen"
            Font = $Fonts[1]
            Margin = '10,10,10,10'
        }
        $CancelButton.Add_Click({
            $Form.DialogResult = [System.Windows.Forms.DialogResult]::Cancel
            $Form.Close()
        })
    
        $Flow.Controls.Add($OKButton)
        $Flow.Controls.Add($CancelButton)
        [void]$Table.ColumnStyles.Add([Windows.Forms.ColumnStyle]::New('AutoSize'))
        [void]$Table.ColumnStyles.Add([Windows.Forms.ColumnStyle]::New('Percent', 10))
        [void]$Table.ColumnStyles.Add([Windows.Forms.ColumnStyle]::New('Absolute', 190))
        $Table.Controls.Add($Label, 0, 0)
        $Table.Controls.Add($Flow, 0, 1)
        $Table.SetColumnSpan($Flow, 3)
    
        $Form.Controls.Add($Table)
        return $Form.ShowDialog()
    }
    
    # Überprüfen, ob Firefox noch läuft und entsprechend handeln
    if (Get-Process "Firefox" -ErrorAction SilentlyContinue) {
        $result = Show-FirefoxRunningDialog
        if ($result -eq [System.Windows.Forms.DialogResult]::OK) {
            Get-Process "Firefox" | Stop-Process
        } else {
            exit
        }
    }
    
    #region Fensterelemente
    $Form = [Windows.Forms.Form]@{
        Text = "Firefox4backup"
        AutoSize = $false
        StartPosition = 'CenterScreen'
        Size = "565,280"  # Größe angepasst, um Platz für die neue Checkbox zu schaffen
        Padding = '10,10,10,10'
        KeyPreview = $true
    }
    $Table = [Windows.Forms.TableLayoutPanel]@{
        Dock = 'Fill'
        AutoSize = $true
    }
    $Flow = [Windows.Forms.FlowLayoutPanel]@{
        Anchor = 'Top'
        AutoSize = $true
        AutoSizeMode = 'GrowAndShrink'
    }
    
    $Open = [Windows.Forms.Button]@{
        Size = "100,40"
        Text = "Speicherort"
        Font = $Fonts[0]
        Anchor = 'Left'
    }
    
    $Textbox = @(
        [Windows.Forms.TextBox]@{
            Font = $Fonts[0]
            Margin = '10,10,0,10'
            Size = "80,50"
            Dock = 'Fill'
        },
        [Windows.Forms.TextBox]@{
            Font = $Fonts[1]
            Margin = '10,10,10,10'
            Dock = 'Fill'
            Text = "\BackupFirefox\$(Get-Date -Format 'yyyy.MM.dd')"
            Enabled = $false
        }
    )
    
    $Checkbox = @(
        [Windows.Forms.Checkbox]@{
            Text = "Programmverzeichnis sichern"
            AutoSize = $true
            Font = $Fonts[0]
            Margin = '10,10,0,10'
        },
        [Windows.Forms.Checkbox]@{
            Text = "vorhandenen Ordner überschreiben"
            AutoSize = $true
            Font = $Fonts[0]
            Margin = '10,0,5,10'
            Visible = $false
        },
        [Windows.Forms.Checkbox]@{
            Text = "profiles.ini sichern"
            AutoSize = $true
            Font = $Fonts[0]
            Margin = '10,1,0,10'
        }
    )
    
    $HS = @{
        Run = [Windows.Forms.Button]@{
            Size = "120,40"
            Text = "Ausführen"
            Font = $Fonts[1]
            Margin = '10,10,10,10'
            Enabled = $false
        }
        SavePath = $false
        overwrite = $true
    }
    #endregion
    
    #region Fensteranordnung
    $Flow.Controls.Add($HS.Run)
    [void]$Table.ColumnStyles.Add([Windows.Forms.ColumnStyle]::New('AutoSize'))
    [void]$Table.ColumnStyles.Add([Windows.Forms.ColumnStyle]::New('Percent', 10))
    [void]$Table.ColumnStyles.Add([Windows.Forms.ColumnStyle]::New('Absolute', 240))
    $Table.Controls.Add($Open, 0, 0)
    $Table.Controls.Add($Textbox[0], 1, 0)
    $Table.Controls.Add($Textbox[1], 2, 0)
    $Table.Controls.Add($Checkbox[0], 0, 3)
    $Table.Controls.Add($Checkbox[1], 0, 4)
    $Table.Controls.Add($Checkbox[2], 0, 5)  # Neue Checkbox für profiles.ini
    $Table.SetColumnSpan($Checkbox[0], 3)
    $Table.SetColumnSpan($Checkbox[1], 3)
    $Table.SetColumnSpan($Checkbox[2], 3)  # Neue Checkbox für profiles.ini
    $Table.Controls.Add($Flow, 0, 6)
    $Table.SetColumnSpan($Flow, 3)
    
    $Form.Controls.Add($Table)
    $Form.Size = "565,290"  # Größe des Formulars angepasst
    #endregion
    
    #region Runspace
    # Firefox-Status überwachen
    $RS = [powershell]::Create().AddScript({
        while ($true) {
            if (Get-Process "Firefox" -ErrorAction SilentlyContinue) {
                $HS.FirefoxRunning = $true
            } else {
                $HS.FirefoxRunning = $false
                $HS.Run.Enabled = $HS.SavePath -and $HS.overwrite
            }
        }
    })
    $RS.Runspace.SessionStateProxy.SetVariable('HS', $HS)
    #endregion
    
    #region Events
    $Form.Add_Load({
        $HS.handle = $RS.BeginInvoke()
        if (Test-Path $Reg) {
            $Textbox[0].Text = Get-ItemPropertyValue $Reg "(default)" -ErrorAction SilentlyContinue
        }
        [void]$this.ActivateControl($Checkbox[0])
    })
    
    $Form.Add_Closed({
        [void]$RS.Stop()
    })
    
    $Form.Add_KeyDown({
        switch ($_.KeyCode) {
            'Return' {$HS.Run.PerformClick()}
            'Escape' {$this.Hide()}
        }
    })
    
    $HS.Run.Add_Click({
        $this.TopLevelControl.Hide()
        $HS.Action = $true
        $HS.BackupCompleted = $true
        Set-ItemProperty -Path $Reg -Name "(default)" -Value $Textbox[0].Text.Replace('"', '') -Force
    })
    
    $Textbox.Add_TextChanged({
        if ($this.Text -and (Test-Path $this.Text.Replace('"', ''))) {
            $HS.SavePath = $true
            if (Test-Path (Join-Path $this.Text.Replace('"', '') "BackupFirefox\$(Get-Date -Format 'yyyy.MM.dd')")) {
                $Checkbox[1].Visible = $true
                $HS.overwrite = $false
            } else {
                $Checkbox[1].Visible = $false
                $HS.overwrite = $true
            }
        } else {
            $HS.SavePath = $false
        }
    })
    
    $Open.Add_Click({
        $Browse = [Windows.Forms.FolderBrowserDialog]@{
            RootFolder = "MyComputer"
            SelectedPath = if ($HS.SavePath) {$Textbox.Text.Replace('"', '')}
        }
        if ($Browse.ShowDialog() -eq 'ok') {$Textbox[0].Text = $Browse.SelectedPath}
    })
    
    $Checkbox[1].Add_CheckStateChanged({
        $HS.overwrite = $this.Checked
    })
    #endregion
    
    #region Ausführung
    [void]$Form.ShowDialog()
    $RS.Dispose()
    #endregion
    
    if ($HS.Action) {
        $LogPfad = Join-Path $Textbox[0].Text.Replace('"', '') $Textbox[1].Text.SubString(1)
        
        # Profilverzeichnis sichern
        if (Test-Path "$LogPfad\Profilverzeichnis.zip") { Remove-Item -Force "$LogPfad\Profilverzeichnis.zip" }
        &$7z a -mx5 -bso0 -bsp1 "$LogPfad\Profilverzeichnis.zip" "$env:appdata\Mozilla\Firefox\Profiles" | Out-String -Stream | Select-String -Pattern "\d+(?=%)" -AllMatches |
            ForEach-Object { Write-Progress -Activity "Profilverzeichnis wird archiviert... " -PercentComplete ([int]$_.Matches.Value) -Status " " }
        
        # Programmverzeichnis sichern (falls aktiviert)
        if ($Checkbox[0].Checked) {
            if (Test-Path "$LogPfad\Programmverzeichnis.zip") { Remove-Item -Force "$LogPfad\Programmverzeichnis.zip" }
            &$7z a -mx5 -bso0 -bsp1 "$LogPfad\Programmverzeichnis.zip" "$env:ProgramFiles\Mozilla Firefox" | Out-String -Stream | Select-String -Pattern "\d+(?=%)" -AllMatches |
                ForEach-Object { Write-Progress -Activity "Programmverzeichnis wird archiviert... " -PercentComplete ([int]$_.Matches.Value) -Status " " }
        }
    
        # profiles.ini sichern (falls aktiviert)
    #    if ($Checkbox[2].Checked) {
    #        $profilesIniPath = "$env:appdata\Mozilla\Firefox\profiles.ini"
    #        if (Test-Path $profilesIniPath) {
    #            if (Test-Path "$LogPfad\profiles.ini.zip") { Remove-Item -Force "$LogPfad\profiles.ini.zip" }
    #            &$7z a -mx5 -bso0 -bsp1 "$LogPfad\profiles.ini.zip" $profilesIniPath | Out-String -Stream | Select-String -Pattern "\d+(?=%)" -AllMatches |
    #                ForEach-Object { Write-Progress -Activity "profiles.ini wird archiviert... " -PercentComplete ([int]$_.Matches.Value) -Status " " }
    #        }
    #    }
    
        # profiles.ini sichern (falls aktiviert)
        if ($Checkbox[2].Checked) {
            $profilesIniPath = Join-Path -Path $env:appdata -ChildPath "Mozilla\Firefox\profiles.ini"
            if (Test-Path $profilesIniPath) {
                if (Test-Path "$LogPfad\profiles.ini.zip") { Remove-Item -Force "$LogPfad\profiles.ini.zip" }
                &$7z a -mx5 -bso0 -bsp1 "$LogPfad\profiles.ini.zip" "$profilesIniPath" | Out-String -Stream | Select-String -Pattern "\d+(?=%)" -AllMatches |
                    ForEach-Object { Write-Progress -Activity "profiles.ini wird archiviert... " -PercentComplete ([int]$_.Matches.Value) -Status " " }
            } else {
                Write-Warning "Die Datei profiles.ini wurde nicht gefunden unter: $profilesIniPath"
            }
        }
    
        $date = Get-Date -Format "yyyy.MM.dd - HH.mm.ss"
        $datum = Get-Date -Format "dd.MM.yyyy"
    
        if (!(Test-Path ("$LogPfad\Sicherung am $date.txt"))) {
            $FF_Version = Get-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*' | Where-Object { $_.DisplayName -like "*firefox*" } | Select-Object -ExpandProperty DisplayVersion
            $Logfile = (New-Item -Path "$LogPfad\Sicherung vom $datum.txt" -ItemType File -Force).FullName
            Add-Content $Logfile ("Diese Sicherung ist vom $(Get-Date -Format 'dddd, dd. MMMM yyyy, HH:mm:ss') Uhr`n")
            Add-Content $Logfile ("Die gesicherte Firefox-Version ist: $FF_Version")
            Add-Content $Logfile "`n`n"
        }
    
        # Nachricht anzeigen
        Add-Type -AssemblyName System.Windows.Forms
    
        #region Grundeinstellungen
        $Fonts = @(
            [Drawing.Font]::New("Microsoft Sans Serif", 12)
            [Drawing.Font]::New("Microsoft Sans Serif", 12, [Drawing.FontStyle]::Bold)
        )
        [Windows.Forms.Application]::EnableVisualStyles()
        #endregion
    
        #region Fensterelemente
        $Form = [Windows.Forms.Form]@{
            Text = "Backup abgeschlossen"
            AutoSize = $false
            StartPosition = 'CenterScreen'
            Size = "565,160"
            Padding = '10,10,10,10'
            KeyPreview = $true
        }
        $Table = [Windows.Forms.TableLayoutPanel]@{
            Dock = 'Fill'
            AutoSize = $true
        }
        $Flow = [Windows.Forms.FlowLayoutPanel]@{
            Anchor = 'Top'
            AutoSize = $true
            AutoSizeMode = 'GrowAndShrink'
        }
    
        $Label = [Windows.Forms.Label]@{
            Font = $Fonts[0]
            Margin = '10,10,10,10'
            AutoSize = $true
            Text = "Backup erfolgreich abgeschlossen."
        }
    
        $HS = @{
            Run = [Windows.Forms.Button]@{
                Size = "120,40"
                Text = "OK"
                Font = $Fonts[1]
                Margin = '10,10,10,10'
                Enabled = $true
            }
        }
        #endregion
    
        #region Fensteranordnung
        $Flow.Controls.Add($HS.Run)
        [void]$Table.ColumnStyles.Add([Windows.Forms.ColumnStyle]::New('AutoSize'))
        [void]$Table.ColumnStyles.Add([Windows.Forms.ColumnStyle]::New('Percent', 10))
        [void]$Table.ColumnStyles.Add([Windows.Forms.ColumnStyle]::New('Absolute', 190))
        $Table.Controls.Add($Label, 1, 0)
        $Table.Controls.Add($Flow, 0, 1)
        $Table.SetColumnSpan($Flow, 3)
    
        $Form.Controls.Add($Table)
        #endregion
    
        #region Button-Click-Event
        $HS.Run.Add_Click({
            $Form.Close()
        })
        #endregion
    
        #region Ausführung
        [void]$Form.ShowDialog()
        #endregion
    }
    Alles anzeigen

    Wer so ein bisschen mit PowerShell kann, kann ja das ganze auf die interne Packfunktion umschreiben!
    Oben ist die ja schon, noch ohne "profiles.ini" sichern.

  • winget meldet zwei Installationen von Firefox

    • Mira_Belle
    • 13. September 2026 um 15:46

    majofo
    Gib in der PowerShell, bei geschlossenem Firefox, folgendes ein.

    winget install --id Mozilla.Firefox.de --force --exact

    Beim erneutem aufruf von winget list firefox solle das Ergebnis so aussehen:

    $ winget list firefox
    Name ID Version Quelle
    -----------------------------------------------------------
    Mozilla Firefox (x64 de) Mozilla.Firefox.de 155.0.1 winget

  • Google Suchergebnisse Tab behalten

    • Mira_Belle
    • 12. September 2026 um 23:49

    .DeJaVu
    Im Script ist aber ein Logikfehler!

    Die Zeile var aLinks = el.querySelectorAll("a[href][target]"); müsste
    var aLinks = el.querySelectorAll("a[href]:not([target])"); lauten.

    Zitat von mistral.ai

    Warum der Fehler nicht auffällt

    1. Logikfehler im Skript:
      Der aktuelle Code wählt Links mit target aus, fügt ihnen dann aber trotzdem target="_blank" hinzu.
      Das bedeutet:
      • Links mit target werden überschrieben (z. B. target="_self" → target="_blank").
      • Links ohne target werden ignoriert (weil sie nicht von a[href][target] erfasst werden).
    2. Praktische Auswirkung:
      • Das Skript funktioniert nicht wie beabsichtigt, aber es bricht nicht – es ändert nur die falschen Links.
    Zitat von Google KI

    Wenn du genau dieses Skript unverändert installierst, wird es aktuell nicht funktionieren. Der Entwickler hat leider einen logischen Fehler in Zeile 49 eingebaut:

    • Das Problem: Dieser Befehl sucht nach Links, die bereits ein target-Attribut besitzen. Laut der Skript-Beschreibung im Kopfbereich soll es aber genau umgekehrt sein: Es soll Links verändern, die noch kein Ziel gesetzt haben.
    • Die Lösung: Damit das Skript das tut, was es verspricht, müsste das [target] in ein :not([target]) geändert werden (also el.querySelectorAll("a[href]:not([target])")).

    Ich wollte wissen, wozu das Script gut ist.

Unterstütze uns!

Jährlich (2026)

71,6 %

71,6% (554,79 von 775 EUR)

Jetzt spenden
  1. Kontakt
  2. Datenschutz
  3. Impressum
Community-Software: WoltLab Suite™
Mastodon