فهرست منبع

remove useless "Alt" module

jherve 1 سال پیش
والد
کامیت
23d69e3e43
2فایلهای تغییر یافته به همراه0 افزوده شده و 88 حذف شده
  1. 0 1
      src/Content.purs
  2. 0 87
      src/LinkedIn/ArtDecoCardAlt.purs

+ 0 - 1
src/Content.purs

@@ -13,7 +13,6 @@ import Effect (Effect)
 import Effect.Class.Console (logShow)
 import Effect.Console (log)
 import LinkedIn.ArtDecoCard (queryArtDecoCard)
-import LinkedIn.ArtDecoCardAlt (ArtDecoCardAltElement, queryArtDecoCardAlt)
 import LinkedIn.ArtDecoTab (queryArtDecoTab)
 import LinkedIn.JobsUnifiedTopCard (parseJobsUnifiedTopCardElement)
 import LinkedIn.Profile.Project as PP

+ 0 - 87
src/LinkedIn/ArtDecoCardAlt.purs

@@ -1,87 +0,0 @@
-module LinkedIn.ArtDecoCardAlt where
-
-import Prelude
-
-import Data.Foldable (class Foldable, foldMap, foldlDefault, foldrDefault)
-import Data.Generic.Rep (class Generic)
-import Data.List.Types (NonEmptyList)
-import Data.Maybe (Maybe)
-import Data.Show.Generic (genericShow)
-import Data.Traversable (class Traversable, sequence, traverseDefault)
-import LinkedIn.QueryRunner (QueryRunner, ignoreNotFound, queryAll, queryOne)
-import Web.DOM (Node)
-import Web.DOM.Node (nodeName)
-
-data ArtDecoCenterHeaderAlt a = ArtDecoCenterHeaderAlt {
-  bold :: a,
-  normal :: Maybe a,
-  light :: Maybe (NonEmptyList a)
-}
-
-derive instance Generic (ArtDecoCenterHeaderAlt a) _
-derive instance Eq a => Eq (ArtDecoCenterHeaderAlt a)
-derive instance Functor ArtDecoCenterHeaderAlt
-instance Show a => Show (ArtDecoCenterHeaderAlt a) where
-  show = genericShow
-
-instance Foldable ArtDecoCenterHeaderAlt where
-  foldMap f (ArtDecoCenterHeaderAlt {bold, normal}) = f bold <> foldMap f normal
-
-  foldl = \x -> foldlDefault x
-  foldr = \x -> foldrDefault x
-
-instance Traversable ArtDecoCenterHeaderAlt where
-  sequence :: forall a m. Applicative m => ArtDecoCenterHeaderAlt (m a) -> m (ArtDecoCenterHeaderAlt a)
-  sequence (ArtDecoCenterHeaderAlt {bold, normal, light}) = ado
-    b <- bold :: m a
-    n <- sequence normal :: m (Maybe a)
-    l <- sequence (map sequence light) :: m (Maybe (NonEmptyList a))
-  in ArtDecoCenterHeaderAlt {bold: b, normal: n, light: l}
-
-  traverse = \x -> traverseDefault x
-
-data ArtDecoCardAltElement a = ArtDecoCardAltElement {
-  pvs_entity :: ArtDecoCenterHeaderAlt a
-}
-
-derive instance Generic (ArtDecoCardAltElement a) _
-derive instance Eq a => Eq (ArtDecoCardAltElement a)
-derive instance Functor ArtDecoCardAltElement
-instance Show (ArtDecoCardAltElement Node) where
-  show (ArtDecoCardAltElement {
-    pvs_entity: ArtDecoCenterHeaderAlt {bold, normal}
-  }) = "ArtDecoCardAltElement(Node " <> "ArtDecoCenterHeaderAlt(Node " <> nodeName bold <> "," <> show (map nodeName normal) <>  ")" <> ")"
-else instance Show a => Show (ArtDecoCardAltElement a) where
-  show = genericShow
-
-instance Foldable ArtDecoCardAltElement where
-  foldMap f (ArtDecoCardAltElement {pvs_entity}) = foldMap f pvs_entity
-
-  foldl = \x -> foldlDefault x
-  foldr = \x -> foldrDefault x
-
-instance Traversable ArtDecoCardAltElement where
-  sequence (ArtDecoCardAltElement {pvs_entity}) = ado
-    p <- sequence pvs_entity
-  in ArtDecoCardAltElement {pvs_entity: p}
-
-  traverse = \x -> traverseDefault x
-
-queryArtDecoCenterHeaderAlt ∷ QueryRunner (ArtDecoCenterHeaderAlt Node)
-queryArtDecoCenterHeaderAlt n = do
-  bold <- queryOne ":scope div.t-bold > span[aria-hidden=true]" n
-  normal <-
-    ignoreNotFound $
-    queryOne ":scope span.t-normal:not(t-black--light) > span[aria-hidden=true]" n
-  light <-
-    ignoreNotFound $
-    queryAll ":scope span.t-black--light > span[aria-hidden=true]" n
-
-  pure $ ArtDecoCenterHeaderAlt {bold, normal, light}
-
-queryArtDecoCardAlt ∷ QueryRunner (ArtDecoCardAltElement Node)
-queryArtDecoCardAlt n = do
-  pvs <- queryOne ":scope div.pvs-entity--padded" n
-  header <- queryArtDecoCenterHeaderAlt pvs
-
-  pure $ ArtDecoCardAltElement { pvs_entity: header }