@@ -32,12 +32,12 @@ import Data.ByteString (ByteString)
3232import Data.Foldable (for_)
3333import Data.Functor.Sum
3434import qualified Data.Map as Map
35−import Data.Maybe (catMaybes, isJust)
35+import Data.Maybe (catMaybes)
3636import Data.Monoid ((<>))
3737import Data.Text (Text)
3838import GHCJS.DOM (currentDocument)
3939import GHCJS.DOM.Document (getHead)
40−import GHCJS.DOM.Element (getAttribute, getElementsByTagName)
40+import GHCJS.DOM.Element (getElementsByClassName)
4141import GHCJS.DOM.HTMLCollection (item, getLength)
4242import GHCJS.DOM.Node (removeChild_)
4343import Language.Javascript.JSaddle (JSM)
@@ -96,10 +96,8 @@ removeHTMLConfigs :: JSM ()
9696removeHTMLConfigs = void $ runMaybeT $ do
9797 doc <- MaybeT currentDocument
9898 hd <- MaybeT $ getHead doc
99− es <- collToList =<< getElementsByTagName hd ("script" :: Text)
100− for_ es $ \e -> do
101− isConfig <- (isJust :: Maybe Text -> Bool) <$> getAttribute e ("data-executable-config-inject" :: Text)
102− when isConfig $ removeChild_ hd e
99+ es <- collToList =<< getElementsByClassName hd ("obelisk-executable-config-inject" :: Text)
100+ for_ es $ removeChild_ hd
103101 where
104102 collToList es = do
105103 len <- getLength es